Steal Hydra's ci #3
This file contains 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" | |
# Limit concurrent runs of this workflow within a single PR | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- master | |
- release | |
pull_request: | |
env: | |
LD_LIBRARY_PATH: ${{ github.workspace }}/srv/lib | |
PKG_CONFIG_PATH: ${{ github.workspace }}/srv/lib/pkgconfig | |
jobs: | |
build: | |
name: "Build" | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup dev environment | |
uses: ./.github/workflows/actions/setup_dev_ubuntu | |
with: | |
clean_caches: true | |
version_ghc: 9.2.8 | |
- name: cabal build | |
run: | | |
cabal build all | |
test: | |
name: "Test" | |
needs: [build] | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
include: | |
- package: cardano-lab | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup dev environment | |
uses: ./.github/workflows/actions/setup_dev_ubuntu | |
with: | |
version_ghc: 9.2.8 | |
- name: ❓ Test | |
if: ${{ matrix.package != 'cardano-lab' }} | |
run: | | |
cabal test ${{ matrix.package }} | |
haddock: | |
name: "Haddock" | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: setup dev environment | |
uses: ./.github/workflows/actions/setup_dev_ubuntu | |
with: | |
version_ghc: 9.2.8 | |
- name: 📚 Documentation (Haddock) | |
run: | | |
.github/workflows/ci-haddock.sh | |
- name: 💾 Upload build & test artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: haddocks | |
path: ./docs/static/haddock | |