Update to conan 2 use #127
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
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~=2.2.0 | |
- name: Configure libcxx for Linux | |
run: | | |
conan profile detect --name default --force | |
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 . | |
- 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 |