diff --git a/.github/workflows/ci-conan.yml b/.github/workflows/ci-conan.yml index 24e90d4..aae7e3e 100644 --- a/.github/workflows/ci-conan.yml +++ b/.github/workflows/ci-conan.yml @@ -12,29 +12,53 @@ env: jobs: conan-on-linux: name: Conan - runs-on: ${{ matrix.os }} + runs-on: ubuntu-latest env: CC: gcc-${{ matrix.compiler_version }} CXX: g++-${{ matrix.compiler_version }} strategy: fail-fast: false matrix: - os: [ubuntu-latest] build_type: [Debug, Release] compiler_version: [9] - compiler_libcxx: [libstdc++11] - option_shared: ['True', 'False'] + option_shared: ['shared=True', 'shared=False'] steps: - - uses: actions/checkout@v2 - - name: Install prerequisites + - uses: actions/checkout@v3 + - name: Generate Dockerfile run: | - sudo apt-get install -y --no-install-recommends g++-11 - sudo pip3 install --upgrade setuptools pip - sudo pip3 install conan - - run: conan profile detect - - run: conan remote add osp https://osp.jfrog.io/artifactory/api/conan/conan-local --force - - run: conan create -s build_type=${{ matrix.build_type }} -s compiler.version=${{ matrix.compiler_version }} -s compiler.libcxx=${{ matrix.compiler_libcxx }} -o fmilibrary/*:shared=${{ matrix.option_shared }} . - - run: conan upload -c -r osp 'fmilibrary*' + mkdir /tmp/osp-builder-docker + cat <<'EOF' >/tmp/osp-builder-docker/Dockerfile + FROM conanio/gcc${{ matrix.compiler_version }}-ubuntu16.04 + 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=1 + 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$(