forked from harpocrates/language-rust
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from GaloisInc/T5-github-actions
Make tests pass, migrate to GitHub Actions
- Loading branch information
Showing
3 changed files
with
73 additions
and
43 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
# The CACHE_VERSION can be updated to force the use of a new cache if | ||
# the current cache contents become corrupted/invalid. This can | ||
# sometimes happen when (for example) the OS version is changed but | ||
# older .so files are cached, which can have various effects | ||
# (e.g. cabal complains it can't find a valid version of the "happy" | ||
# tool). | ||
env: | ||
CACHE_VERSION: 1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
os: [ubuntu-22.04] | ||
ghc: ["9.4.8", "9.6.6", "9.8.2"] | ||
cabal: ["3.10.3.0"] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
submodules: true | ||
|
||
- uses: haskell-actions/setup@v2 | ||
id: setup-haskell | ||
with: | ||
ghc-version: ${{ matrix.ghc }} | ||
cabal-version: ${{ matrix.cabal }} | ||
|
||
- uses: actions/cache/restore@v4 | ||
name: Restore cabal store cache | ||
with: | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-newstyle | ||
key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }} | ||
restore-keys: | | ||
${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}- | ||
- name: Update | ||
run: cabal update | ||
- name: Configure | ||
run: cabal configure --enable-tests | ||
- name: Build | ||
run: cabal build | ||
- name: Run tests | ||
run: cabal test | ||
|
||
- uses: actions/cache/save@v4 | ||
name: Save cabal store cache | ||
if: always() | ||
with: | ||
path: | | ||
${{ steps.setup-haskell.outputs.cabal-store }} | ||
dist-newstyle | ||
key: ${{ env.CACHE_VERSION }}-cabal-${{ matrix.os }}-${{ matrix.ghc }}-${{ hashFiles(format('cabal.GHC-{0}.config', matrix.ghc)) }}-${{ github.sha }} |
This file was deleted.
Oops, something went wrong.
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