Skip to content

Addressed failing builds (#207) #122

Addressed failing builds (#207)

Addressed failing builds (#207) #122

name: cosim-demo-app CI
# This workflow is triggered on pushes to the repository.
on: [push, workflow_dispatch]
jobs:
client:
name: Build client
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
- uses: DeLaGuardo/setup-clojure@3.1
with:
lein: latest
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-m2-${{ hashFiles('**/project.clj') }}
restore-keys: |
${{ runner.os }}-m2-
- run: lein cljsbuild once min
- run: lein cljsbuild test
- uses: actions/upload-artifact@v2
with:
name: client
path: resources/public/static/js/compiled/app.js
server:
name: Build Go Application with packr
needs: client
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, windows-2019]
compiler_version: [9]
env:
CONAN_LOGIN_USERNAME_OSP: ${{ secrets.osp_artifactory_usr }}
CONAN_PASSWORD_OSP: ${{ secrets.osp_artifactory_pwd }}
CONAN_REVISIONS_ENABLED: 1
CONAN_NON_INTERACTIVE: True
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install prerequisites
run: pip install conan==1.59
- name: Configure libcxx for Linux
run: |
conan profile new default --detect
conan profile update settings.compiler.libcxx=libstdc++11 default
if: runner.os == 'Linux'
- name: Add Conan remote
run: conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
- name: Install Conan deps
run: conan install -s build_type=Release .
- name: Download client
uses: actions/download-artifact@v2
with:
name: client
path: resources/public/static/js/compiled/
- uses: actions/setup-go@v2
with:
go-version: '1.14'
- name: Install packr
run: go get -v github.com/gobuffalo/packr/packr
- name: packr build
run: packr build -v
env:
CGO_LDFLAGS: '-Wl,-rpath,$ORIGIN/../lib'
- name: Prepare Windows distribution
run: |
cp ./cosim-demo-app.exe dist/bin
cp ./run-windows.cmd ./dist
if: runner.os == 'Windows'
- name: Prepare Linux distribution
run: |
mkdir -p dist/bin
cp ./cosim-demo-app dist/bin
cp ./run-linux ./dist
sh ./set-rpath ./dist/lib
if: runner.os == 'Linux'
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: cosim-demo-app-${{ runner.os }}
path: dist