chore: migrate to conan 2 #2938
Workflow file for this run
This file contains hidden or 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: Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| types: [opened, synchronize, reopened, ready_for_review] | |
| defaults: | |
| run: | |
| shell: bash | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| conan-cache: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/faasm/faabric:0.22.0 | |
| env: | |
| DEPLOYMENT_TYPE: gha-ci | |
| steps: | |
| - name: "Check-out code" | |
| uses: actions/checkout@v4 | |
| - uses: faasm/conan-cache-action@main | |
| with: | |
| build-type: Debug | |
| from: faabric | |
| - name: "Build Conan deps to be shared by all runs" | |
| run: | | |
| ./bin/inv_wrapper.sh dev.conan --build Debug | |
| ./bin/inv_wrapper.sh dev.conan --build Release | |
| docs: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/faasm/faabric:0.22.0 | |
| steps: | |
| - name: "Check out code" | |
| uses: actions/checkout@v4 | |
| - name: "Build docs" | |
| run: ./bin/inv_wrapper.sh docs | |
| formatting: | |
| if: github.event.pull_request.draft == false | |
| runs-on: ubuntu-latest | |
| container: | |
| image: ghcr.io/faasm/faabric:0.22.0 | |
| steps: | |
| - name: "Check out code" | |
| uses: actions/checkout@v4 | |
| # We need to set the safe git directory as formatting relies on git-ls | |
| # See actions/checkout#766 | |
| - name: "Set the GH workspace as a safe git directory" | |
| run: git config --global --add safe.directory "$GITHUB_WORKSPACE" | |
| - name: "Code formatting checks" | |
| run: ./bin/inv_wrapper.sh format-code --check | |
| code-coverage: | |
| if: github.event.pull_request.draft == false | |
| needs: [conan-cache] | |
| runs-on: ubuntu-latest | |
| env: | |
| DEPLOYMENT_TYPE: gha-ci | |
| REDIS_QUEUE_HOST: redis | |
| REDIS_STATE_HOST: redis | |
| container: | |
| image: ghcr.io/faasm/faabric:0.22.0 | |
| options: --privileged | |
| services: | |
| redis: | |
| image: redis | |
| steps: | |
| - name: "Check-out code" | |
| uses: actions/checkout@v4 | |
| - uses: faasm/conan-cache-action@main | |
| with: | |
| build-type: Debug | |
| from: faabric | |
| - name: "Ping redis" | |
| run: redis-cli -h redis ping | |
| - name: "Run conan" | |
| run: ./bin/inv_wrapper.sh dev.conan --clean --build=Debug | |
| - name: "Run cmake for tests" | |
| run: ./bin/inv_wrapper.sh dev.cmake --clean --build=Debug --coverage | |
| - name: "Build tests" | |
| run: ./bin/inv_wrapper.sh dev.cc faabric_tests | |
| - name: "Run tests with profiling" | |
| run: ./bin/inv_wrapper.sh tests | |
| env: | |
| LLVM_PROFILE_FILE: faabric.profraw | |
| - name: "Generate code coverage report" | |
| run: ./bin/inv_wrapper.sh dev.coverage-report --file-in faabric.profraw --file-out coverage.txt | |
| - name: "Upload coverage report to CodeCov" | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| tests: | |
| if: github.event.pull_request.draft == false | |
| needs: [conan-cache] | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| sanitiser: [None, Thread, Address, Undefined] | |
| env: | |
| DEPLOYMENT_TYPE: gha-ci | |
| REDIS_QUEUE_HOST: redis | |
| REDIS_STATE_HOST: redis | |
| container: | |
| image: ghcr.io/faasm/faabric:0.22.0 | |
| options: --privileged | |
| services: | |
| redis: | |
| image: redis | |
| steps: | |
| - name: "Check-out code" | |
| uses: actions/checkout@v4 | |
| - uses: faasm/conan-cache-action@main | |
| with: | |
| build-type: Debug | |
| from: faabric | |
| - name: "Ping redis" | |
| run: redis-cli -h redis ping | |
| # Re-run conan with the --clean flag to rebuild the packages with sanitisers | |
| - name: "Run conan" | |
| run: ./bin/inv_wrapper.sh dev.conan --clean --build=Debug --sanitiser ${{ matrix.sanitiser }} | |
| - name: "Run cmake for tests" | |
| run: ./bin/inv_wrapper.sh dev.cmake --clean --build=Debug --sanitiser ${{ matrix.sanitiser }} | |
| - name: "Build tests" | |
| run: ./bin/inv_wrapper.sh dev.cc faabric_tests | |
| - name: "Run tests" | |
| run: ./bin/inv_wrapper.sh tests | |
| timeout-minutes: 15 | |
| dist-tests: | |
| if: github.event.pull_request.draft == false | |
| needs: [conan-cache] | |
| runs-on: ubuntu-latest | |
| env: | |
| CONAN_CACHE_MOUNT_SOURCE: ~/.conan/ | |
| steps: | |
| # --- Code update --- | |
| - name: "Check out code" | |
| uses: actions/checkout@v4 | |
| - uses: faasm/conan-cache-action@main | |
| with: | |
| build-type: Debug | |
| from: faabric | |
| - name: "Build distributed tests" | |
| run: ./dist-test/build.sh | |
| - name: "Run the distributed tests" | |
| run: ./dist-test/run.sh | |
| timeout-minutes: 7 | |
| - name: "Print dist-test server logs" | |
| if: always() | |
| run: docker compose logs dist-test-server | |
| - name: "Print planner logs" | |
| if: always() | |
| run: docker compose logs planner | |
| examples: | |
| if: github.event.pull_request.draft == false | |
| needs: [conan-cache] | |
| runs-on: ubuntu-latest | |
| env: | |
| DEPLOYMENT_TYPE: gha-ci | |
| REDIS_QUEUE_HOST: redis | |
| REDIS_STATE_HOST: redis | |
| container: | |
| image: ghcr.io/faasm/faabric:0.22.0 | |
| services: | |
| redis: | |
| image: redis | |
| steps: | |
| - name: "Check-out code" | |
| uses: actions/checkout@v4 | |
| - uses: faasm/conan-cache-action@main | |
| with: | |
| build-type: Release | |
| from: faabric | |
| - name: "Run conan" | |
| run: ./bin/inv_wrapper.sh dev.conan --build=Release | |
| - name: "Run cmake shared" | |
| run: ./bin/inv_wrapper.sh dev.cmake --clean --shared --build=Release | |
| - name: "Build Faabric shared library" | |
| run: ./bin/inv_wrapper.sh dev.cc faabric --shared | |
| - name: "Install Faabric shared library" | |
| run: ./bin/inv_wrapper.sh dev.install faabric --shared | |
| - name: "Re-run conan (needed for examples)" | |
| run: ./bin/inv_wrapper.sh dev.conan --build=Release | |
| - name: "Build examples" | |
| run: ./bin/inv_wrapper.sh examples | |
| - name: "Run example to check" | |
| run: ./bin/inv_wrapper.sh examples.execute check |