diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index 35ebbe7d..fdbc3a31 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -3,24 +3,13 @@ name: libcosim CI Conan # This workflow is triggered on pushes to the repository. on: [push, workflow_dispatch] -env: - CONAN_LOGIN_USERNAME_OSP: ${{ secrets.osp_artifactory_usr }} - CONAN_PASSWORD_OSP: ${{ secrets.osp_artifactory_pwd }} - CONAN_REVISIONS_ENABLED: 1 - CONAN_NON_INTERACTIVE: True - CONAN_USE_ALWAYS_SHORT_PATHS: True - jobs: conan-on-linux: name: Conan - runs-on: ${{ matrix.os }} - env: - CC: gcc-${{ matrix.compiler_version }} - CXX: g++-${{ matrix.compiler_version }} + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - os: [ubuntu-18.04] build_type: [Debug, Release] compiler_version: [7, 8, 9] compiler_libcxx: [libstdc++11] @@ -28,16 +17,27 @@ jobs: steps: - uses: actions/checkout@v2 - - name: Install prerequisites + - name: Generate Dockerfile run: | - sudo apt-get install -y --no-install-recommends \ - g++-8 - sudo pip3 install --upgrade setuptools pip - sudo pip3 install conan - - name: Configure Conan - run: conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force - - name: Conan create + mkdir /tmp/osp-builder-docker + cat <<'EOF' >/tmp/osp-builder-docker/Dockerfile + FROM conanio/gcc${{ matrix.compiler_version }} + ENV CONAN_LOGIN_USERNAME_OSP=${{ secrets.osp_artifactory_usr }} + ENV CONAN_PASSWORD_OSP=${{ secrets.osp_artifactory_pwd }} + ENV CONAN_REVISIONS_ENABLED=1 + ENV CONAN_NON_INTERACTIVE=True + ENV CONAN_USE_ALWAYS_SHORT_PATHS=True + ENV LIBCOSIM_RUN_TESTS_ON_CONAN_BUILD=True + COPY entrypoint.sh / + ENTRYPOINT /entrypoint.sh + EOF + - name: Generate entrypoint.sh run: | + cat <<'EOF' >/tmp/osp-builder-docker/entrypoint.sh + #!/bin/bash -v + set -eu + cd /mnt/source + conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force REFNAME="${GITHUB_REF#refs/*/}" VERSION="v$(