Skip to content

Commit

Permalink
Update CI
Browse files Browse the repository at this point in the history
- Add custom names for jobs
- Use multiple LLVM versions in the matrix
- Clean up the code
  • Loading branch information
AzimMuradov committed Oct 5, 2024
1 parent 0e30e15 commit fea6665
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 7 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@ on:

jobs:
build:
name: "build (os: ${{ matrix.os }}, ghc: ${{ matrix.ghc }}, cabal: ${{ matrix.cabal }}, llvm: ${{ matrix.llvm }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
ghc: ["9.4.8"]
cabal: ["3.8"]
llvm: ["15", "16", "17", "18"]

steps:
- name: Checkout code
Expand Down Expand Up @@ -46,11 +48,11 @@ jobs:
lib/**/*.hs
test/**/*.hs
- name: Install LLVM
run: sudo apt install -y llvm-17 llvm-17-dev
run: sudo apt install -y llvm-${{ matrix.llvm }} llvm-${{ matrix.llvm }}-dev
- name: Build project
run: cabal build
- name: Run tests
run: >
cabal test
--test-show-details=direct
--test-options "--color=always"
cabal test
--test-show-details=direct
--test-options "--color=always"
5 changes: 3 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:

jobs:
docs:
name: "docs (os: ${{ matrix.os }}, ghc: ${{ matrix.ghc }}, cabal: ${{ matrix.cabal }}, llvm: ${{ matrix.llvm }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04]
ghc: ["9.4.8"]
cabal: ["3.8"]
llvm: ["18"]

steps:
- name: Checkout code
Expand All @@ -32,11 +34,10 @@ jobs:
key: ${{ runner.os }}-docs-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
restore-keys: ${{ runner.os }}-docs-${{ env.cache-name }}-
- name: Install LLVM
run: sudo apt install -y llvm-17 llvm-17-dev
run: sudo apt install -y llvm-${{ matrix.llvm }} llvm-${{ matrix.llvm }}-dev
- name: Build docs
run: >
cabal haddock
--haddock-options="--ignore-all-exports"
--enable-documentation
--haddock-html-location='https://hackage.haskell.org/package/$pkg-$version/docs'
--haddock-hyperlink-source
Expand Down
2 changes: 1 addition & 1 deletion cabal.project
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source-repository-package
type: git
location: https://github.com/AzimMuradov/llvm-codegen.git
tag: f77d7cd82b40004d7eadc6fcc1ff536db599206e
tag: a0fc18fad8471def82eea59eb383d3defbb49efe

packages: .

0 comments on commit fea6665

Please sign in to comment.