|
| 1 | +name: Build on OSX/Linux via Pixi |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + schedule: |
| 6 | + - cron: 0 8 3 * * |
| 7 | + push: |
| 8 | + branches: |
| 9 | + - main |
| 10 | + paths-ignore: |
| 11 | + - 'doc/**' |
| 12 | + - 'scripts/**' |
| 13 | + - '.gitlab-ci.yml' |
| 14 | + - '.gitignore' |
| 15 | + - '**.md' |
| 16 | + - 'CITATION.cff' |
| 17 | + - 'CITATIONS.bib' |
| 18 | + pull_request: |
| 19 | + paths-ignore: |
| 20 | + - 'doc/' |
| 21 | + - 'scripts/' |
| 22 | + - '.gitlab-ci.yml' |
| 23 | + - '.gitignore' |
| 24 | + - '**.md' |
| 25 | + - 'CITATION.cff' |
| 26 | + - 'CITATIONS.bib' |
| 27 | +concurrency: |
| 28 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 29 | + cancel-in-progress: true |
| 30 | + |
| 31 | +jobs: |
| 32 | + aligator-example-pixi: |
| 33 | + name: ${{ matrix.os }} - Env ${{ matrix.environment }} ${{ matrix.build_type }} |
| 34 | + runs-on: ${{ matrix.os }} |
| 35 | + env: |
| 36 | + CCACHE_BASEDIR: "${GITHUB_WORKSPACE}" |
| 37 | + CCACHE_DIR: "${GITHUB_WORKSPACE}/.ccache" |
| 38 | + CCACHE_COMPRESS: true |
| 39 | + CCACHE_COMPRESSLEVEL: 6 |
| 40 | + |
| 41 | + strategy: |
| 42 | + fail-fast: false |
| 43 | + matrix: |
| 44 | + os: [ubuntu-latest, macos-latest, macos-13] |
| 45 | + environment: [default] |
| 46 | + build_type: [Release, Debug] |
| 47 | + |
| 48 | + steps: |
| 49 | + - uses: actions/checkout@v4 |
| 50 | + with: |
| 51 | + submodules: recursive |
| 52 | + |
| 53 | + - uses: actions/cache@v4 |
| 54 | + with: |
| 55 | + path: .ccache |
| 56 | + key: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}-${{ github.sha }} |
| 57 | + restore-keys: ccache-macos-linux-pixi-${{ matrix.os }}-${{ matrix.build_type }}- |
| 58 | + |
| 59 | + - uses: prefix-dev/[email protected] |
| 60 | + with: |
| 61 | + cache: true |
| 62 | + environments: ${{ matrix.environment }} |
| 63 | + |
| 64 | + - name: Build aligator-cmake-example-project |
| 65 | + shell: bash -l {0} |
| 66 | + env: |
| 67 | + CMAKE_BUILD_PARALLEL_LEVEL: 4 |
| 68 | + ALCEP_BUILD_TYPE: ${{ matrix.build_type }} |
| 69 | + run: | |
| 70 | + pixi run -e ${{ matrix.environment }} build |
| 71 | +
|
| 72 | + check: |
| 73 | + name: check-macos-linux-pixi |
| 74 | + |
| 75 | + needs: |
| 76 | + - aligator-example-pixi |
| 77 | + |
| 78 | + runs-on: ubuntu-latest |
| 79 | + |
| 80 | + steps: |
| 81 | + - name: Decide whether the needed jobs succeeded or failed |
| 82 | + uses: re-actors/alls-green@release/v1 |
| 83 | + with: |
| 84 | + jobs: ${{ toJSON(needs) }} |
0 commit comments