@@ -6,46 +6,36 @@ on: [push, workflow_dispatch]
66jobs :
77 linux :
88 name : Linux
9- runs-on : ubuntu-latest
109 strategy :
1110 fail-fast : false
1211 matrix :
1312 build_type : [Debug, Release]
14- compiler_version : [9 ]
13+ compiler_version : [14 ]
1514 option_proxyfmu : ['proxyfmu=True', 'proxyfmu=False']
15+ runs-on : ubuntu-latest
16+ container :
17+ image : gcc:${{ matrix.compiler_version }}
1618
1719 steps :
18- - uses : actions/checkout@v4
19- - name : Generate Dockerfile
20+ - uses : actions/checkout@v6
21+ - name : Install prerequisites
2022 run : |
21- mkdir /tmp/osp-builder-docker
22- cat <<'EOF' >/tmp/osp-builder-docker/Dockerfile
23- FROM conanio/gcc${{ matrix.compiler_version }}-ubuntu16.04
24- COPY entrypoint.sh /
25- ENTRYPOINT /entrypoint.sh
26- EOF
27- - name : Generate entrypoint.sh
23+ apt-get update
24+ apt-get install -y pipx cmake doxygen
25+ pipx install conan
26+ echo "$HOME/.local/bin" >> "$GITHUB_PATH"
27+ - name : Configure Conan
28+ run : |
29+ conan profile detect
30+ conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local
31+ - name : Build
2832 run : |
29- cat <<'EOF' >/tmp/osp-builder-docker/entrypoint.sh
30- #!/bin/bash -v
31- set -eu
32- conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force
33- cd /mnt/source
3433 conan install . -s build_type=${{ matrix.build_type }} -o "libcosim/*:${{ matrix.option_proxyfmu }}" --build=missing
3534 cmake -S . -B build/${{ matrix.build_type }} -DCMAKE_TOOLCHAIN_FILE=generators/conan_toolchain.cmake -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
3635 cmake --build build/${{ matrix.build_type }}
3736 cmake --build build/${{ matrix.build_type }} --target install
38- EOF
39- chmod 0777 /tmp/osp-builder-docker/entrypoint.sh
40- - name : Build Docker image
41- run : docker build -t osp-builder /tmp/osp-builder-docker/
42- - name : Build cosim
43- run : |
44- chmod 0777 $(pwd) # because commands in conanio containers run as an unprivileged user
45- mkdir -m 0777 build
46- docker run --rm -v $(pwd):/mnt/source osp-builder
4737 - name : Upload artifact
48- uses : actions/upload-artifact@v4
38+ uses : actions/upload-artifact@v7
4939 with :
5040 name : cosim-${{ runner.os }}-${{ matrix.build_type }}-${{ matrix.compiler_version }}-${{ matrix.option_proxyfmu }}
5141 path : build/${{ matrix.build_type }}/dist
6252 option_proxyfmu : ['proxyfmu=True', 'proxyfmu=False']
6353
6454 steps :
65- - uses : actions/checkout@v4
55+ - uses : actions/checkout@v6
6656 - name : Install prerequisites
6757 run : |
6858 pip3 install --upgrade setuptools pip
7868 cmake --build build --config ${{ matrix.build_type }}
7969 cmake --build build --config ${{ matrix.build_type }} --target install
8070 - name : Upload artifact
81- uses : actions/upload-artifact@v4
71+ uses : actions/upload-artifact@v7
8272 with :
8373 name : cosim-${{ runner.os }}-${{ matrix.build_type }}-${{ matrix.option_proxyfmu }}
8474 path : build/dist
0 commit comments