CI Examples #441
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: CI Examples | |
| permissions: | |
| contents: read | |
| on: | |
| schedule: | |
| - cron: '0 0 * * *' | |
| workflow_dispatch: {} | |
| pull_request: | |
| branches: [ main ] | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| run-examples: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-2022] | |
| conan-version: [release, develop] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install cross-compilation toolchain (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-12-arm-linux-gnueabihf g++-12-arm-linux-gnueabihf | |
| - name: Set up Python | |
| id: setup_python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| update-environment: false | |
| - name: Prepend Python to System PATH | |
| run: echo "$(dirname ${{ steps.setup_python.outputs.python-path }})" >> $GITHUB_PATH | |
| - name: Install CMake | |
| uses: jwlawson/actions-setup-cmake@v1.14 | |
| with: | |
| cmake-version: "3.23" | |
| - name: Set up Java | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| - name: Install Bazel | |
| uses: bazel-contrib/setup-bazel@0.15.0 | |
| with: | |
| bazelisk-version: "1.27.0" | |
| - name: Install autotools (macOS) | |
| if: runner.os == 'macOS' | |
| run: brew install automake autoconf | |
| - name: Install Cosign | |
| uses: sigstore/cosign-installer@v4.1.1 | |
| - name: Install Conan | |
| shell: bash | |
| run: | | |
| python -m pip install --upgrade pip | |
| if [[ "${{ matrix.conan-version }}" == "develop" ]]; then | |
| pip install -e git+https://github.com/conan-io/conan.git@develop2#egg=conan --upgrade | |
| else | |
| pip install conan --upgrade | |
| fi | |
| pip install meson | |
| conan --version | |
| conan profile detect --force | |
| - name: Find and run examples | |
| shell: bash | |
| env: | |
| PYTHONPATH: ${{ github.workspace }} | |
| COSIGN_PASSWORD: "" | |
| run: python -u "${{ github.workspace }}/.github/run_ci_tests.py" |