built ordered list #525
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: test-gibbon | |
on: [ push, pull_request ] | |
jobs: | |
linux: | |
if: github.event.pull_request.draft == false | |
name: test-gibbon | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: dependencies | |
run: | | |
sudo apt-get update | |
sudo add-apt-repository -y 'ppa:plt/racket' | |
sudo apt-get update | |
sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test | |
sudo apt update | |
sudo apt-get install -y libgc-dev libgmp-dev uthash-dev gcc-11 racket | |
sudo unlink /usr/bin/gcc && sudo ln -s /usr/bin/gcc-11 /usr/bin/gcc | |
- name: ghc and cabal | |
env: | |
HCKIND: ghc | |
HCVER: 9.4.6 | |
run: | | |
mkdir -p "$HOME/.ghcup/bin" | |
curl -sL https://downloads.haskell.org/ghcup/0.1.19.2/x86_64-linux-ghcup-0.1.19.2 > "$HOME/.ghcup/bin/ghcup" | |
sudo chmod a+x "$HOME/.ghcup/bin/ghcup" | |
"$HOME/.ghcup/bin/ghcup" install ghc "$HCVER" || (cat "$HOME"/.ghcup/logs/*.* && false) | |
"$HOME/.ghcup/bin/ghcup" install cabal 3.10.1.0 || (cat "$HOME"/.ghcup/logs/*.* && false) | |
HC=$HOME/.ghcup/bin/$HCKIND-$HCVER | |
echo "HC=$HC" >> "$GITHUB_ENV" | |
echo "CABAL=$HOME/.ghcup/bin/cabal-3.10.1.0 -vnormal+nowrap" >> "$GITHUB_ENV" | |
echo "$HOME/.ghcup/bin/" >> $GITHUB_PATH | |
- name: versions | |
run: | | |
$HC --version | |
racket --version | |
gcc --version | |
stack --version | |
cabal --version | |
- name: checkout | |
uses: actions/checkout@v2 | |
- run: cabal v2-update -w $HC | |
- run: cabal v2-freeze -w $HC | |
- name: cache-cabal | |
uses: actions/cache@v2 | |
with: | |
key: ${{ runner.os }}-cabal-${{ hashFiles('cabal.project.freeze') }} | |
restore-keys: | | |
${{ runner.os }}-cabal- | |
path: | | |
~/.cabal/store | |
~/.cabal/packages | |
dist-newstyle | |
- name: build | |
run: | | |
cd gibbon-compiler | |
cabal v2-update -w $HC | |
cabal v2-build -w $HC . | |
- name: cache-answers | |
uses: actions/cache@v2 | |
with: | |
key: ${{ runner.os }}-answers | |
path: gibbon-compiler/examples/build_tmp/*.ans | |
- name: answers | |
run: | | |
cd gibbon-compiler | |
make answers | |
- name: list-answers | |
run: | | |
ls gibbon-compiler/examples/build_tmp/*.ans | |
- name: tests | |
run: | | |
export GIBBONDIR=`pwd` | |
cd gibbon-compiler/ | |
cabal v2-exec -w $HC test-gibbon-examples -- -v2 |