Build, Test, and Benchmark #4
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
###################################################### | |
## ## | |
## !!!! Autogenerated YAML file, do not edit !!!! ## | |
## ## | |
## Edit source in /src/github/workflows/ instead! ## | |
## ## | |
###################################################### | |
env: | |
AGDA_TESTS_OPTIONS: -j${PARALLEL_TESTS} --hide-successes | |
BUILD_DIR: dist | |
GHC_VER: 9.8.1 | |
PARALLEL_TESTS: 2 | |
STACK: stack --system-ghc | |
STACK_VER: 2.13.1 | |
TASTY_ANSI_TRICKS: 'false' | |
jobs: | |
build: | |
if: | | |
!contains(github.event.head_commit.message, '[skip ci]') | |
&& !contains(github.event.head_commit.message, '[ci skip]') | |
&& !contains(github.event.head_commit.message, '[github skip]') | |
&& !contains(github.event.head_commit.message, '[skip github]') | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Info about the context | |
run: | | |
echo "github.base_ref = ${{ github.base_ref }}" | |
echo "github.head_ref = ${{ github.head_ref }}" | |
echo "github.event_name = ${{ github.event_name }}" | |
echo "github.ref = ${{ github.ref }}" | |
echo "github.ref_name = ${{ github.ref_name }}" | |
echo "github.ref_type = ${{ github.ref_type }}" | |
- if: github.ref != 'refs/heads/master' | |
uses: styfle/[email protected] | |
with: | |
access_token: ${{ github.token }} | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
ghc-version: ${{ env.GHC_VER }} | |
stack-version: ${{ env.STACK_VER }} | |
- name: Copy stack-${{ env.GHC_VER}}.yaml to stack.yaml | |
run: cp stack-${{ env.GHC_VER }}.yaml stack.yaml | |
- name: Determine the ICU version | |
run: | | |
ICU_VER=$(pkg-config --modversion icu-i18n) | |
echo "ICU_VER=${ICU_VER}" | |
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}" | |
- id: cache | |
name: Restore cache from approximate key | |
uses: actions/cache@v4 | |
with: | |
key: test.yml-ghc-${{ env.GHC_VER }}-stack-${{ env.STACK_VER }}-icu-${{ env.ICU_VER | |
}}-plan-${{ hashFiles('Agda.cabal','stack.yaml') }} | |
path: | | |
~/.stack | |
restore-keys: test.yml-ghc-${{ env.GHC_VER }}-stack-${{ env.STACK_VER }}-icu-${{ | |
env.ICU_VER }}- | |
- name: Install dependencies for Agda and its test suites | |
run: make install-deps | |
- name: Build Agda | |
run: make BUILD_DIR="${BUILD_DIR}" install-bin-debug | |
- name: Pack artifacts | |
run: | | |
strip ${BUILD_DIR}/build/agda-tests/agda-tests \ | |
${BUILD_DIR}/build/agda/agda \ | |
${BUILD_DIR}/build/agda-mode/agda-mode | |
tar --use-compress-program zstd -cvf dist.tzst \ | |
${BUILD_DIR}/build/agda-tests/agda-tests \ | |
${BUILD_DIR}/build/agda/agda \ | |
${BUILD_DIR}/build/agda-mode/agda-mode | |
tar --use-compress-program zstd -cvf stack-work.tzst .stack-work stack.yaml stack.yaml.lock | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
if-no-files-found: error | |
name: agda-${{ runner.os }}-${{ github.sha }} | |
path: | | |
dist.tzst | |
stack-work.tzst | |
retention-days: 1 | |
cubical: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
ghc-version: ${{ env.GHC_VER }} | |
stack-version: ${{ env.STACK_VER }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: agda-${{ runner.os }}-${{ github.sha }} | |
- name: Unpack artifacts | |
run: | | |
tar --use-compress-program zstd -xvf dist.tzst | |
tar --use-compress-program zstd -xvf stack-work.tzst | |
- name: Determine the ICU version | |
run: | | |
ICU_VER=$(pkg-config --modversion icu-i18n) | |
echo "ICU_VER=${ICU_VER}" | |
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}" | |
- id: cache | |
name: Restore cache from exact key | |
uses: actions/cache/restore@v4 | |
with: | |
key: test.yml-ghc-${{ env.GHC_VER }}-stack-${{ env.STACK_VER }}-icu-${{ env.ICU_VER | |
}}-plan-${{ hashFiles('Agda.cabal','stack.yaml') }} | |
path: | | |
~/.stack | |
- name: Cubical library test | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" cubical-test | |
- name: Successful tests using the cubical library | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" cubical-succeed | |
interaction-latex-html: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
ghc-version: ${{ env.GHC_VER }} | |
stack-version: ${{ env.STACK_VER }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: agda-${{ runner.os }}-${{ github.sha }} | |
- name: Unpack artifacts | |
run: | | |
tar --use-compress-program zstd -xvf dist.tzst | |
tar --use-compress-program zstd -xvf stack-work.tzst | |
- name: Determine the ICU version | |
run: | | |
ICU_VER=$(pkg-config --modversion icu-i18n) | |
echo "ICU_VER=${ICU_VER}" | |
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}" | |
- id: cache | |
name: Restore cache from exact key | |
uses: actions/cache/restore@v4 | |
with: | |
key: test.yml-ghc-${{ env.GHC_VER }}-stack-${{ env.STACK_VER }}-icu-${{ env.ICU_VER | |
}}-plan-${{ hashFiles('Agda.cabal','stack.yaml') }} | |
path: | | |
~/.stack | |
- name: Install Tex Live and Emacs | |
run: | | |
sudo apt-get update | |
sudo apt-get install texlive-binaries ${APT_GET_OPTS} | |
sudo apt-get install emacs-nox ${APT_GET_OPTS} | |
- name: Suite of tests for the LaTeX and HTML backends | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" DONT_RUN_LATEX=Y latex-html-test | |
- if: always() | |
name: Testing the Emacs mode | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" testing-emacs-mode | |
- if: always() | |
name: User manual (test) | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" user-manual-test | |
- if: always() | |
name: User manual covers all options | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" user-manual-covers-options | |
- if: always() | |
name: User manual covers all warnings | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" user-manual-covers-warnings | |
- if: always() | |
name: Suite of interaction tests | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" interaction | |
stdlib-test: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
ghc-version: ${{ env.GHC_VER }} | |
stack-version: ${{ env.STACK_VER }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: agda-${{ runner.os }}-${{ github.sha }} | |
- name: Unpack artifacts | |
run: | | |
tar --use-compress-program zstd -xvf dist.tzst | |
tar --use-compress-program zstd -xvf stack-work.tzst | |
- name: Determine the ICU version | |
run: | | |
ICU_VER=$(pkg-config --modversion icu-i18n) | |
echo "ICU_VER=${ICU_VER}" | |
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}" | |
- id: cache | |
name: Restore cache from exact key | |
uses: actions/cache/restore@v4 | |
with: | |
key: test.yml-ghc-${{ env.GHC_VER }}-stack-${{ env.STACK_VER }}-icu-${{ env.ICU_VER | |
}}-plan-${{ hashFiles('Agda.cabal','stack.yaml') }} | |
path: | | |
~/.stack | |
- name: Standard library test | |
run: | | |
# ASR (2021-01-17). `cabal update` is required due to #5138. | |
# We should also use `stack` in this test. | |
cabal update | |
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-test | |
- if: always() | |
name: Benchmark | |
run: | | |
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" benchmark-without-logs | |
make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" benchmark-summary | |
- name: Standard library compiler tests | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-compiler-test | |
- name: Successful tests using the standard library | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-succeed | |
- name: Interaction tests using the standard library | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" std-lib-interaction | |
test: | |
needs: build | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: haskell-actions/setup@v2 | |
with: | |
enable-stack: true | |
ghc-version: ${{ env.GHC_VER }} | |
stack-version: ${{ env.STACK_VER }} | |
- uses: actions/download-artifact@v4 | |
with: | |
name: agda-${{ runner.os }}-${{ github.sha }} | |
- name: Unpack artifacts | |
run: | | |
tar --use-compress-program zstd -xvf dist.tzst | |
tar --use-compress-program zstd -xvf stack-work.tzst | |
- name: Determine the ICU version | |
run: | | |
ICU_VER=$(pkg-config --modversion icu-i18n) | |
echo "ICU_VER=${ICU_VER}" | |
echo "ICU_VER=${ICU_VER}" >> "${GITHUB_ENV}" | |
- id: cache | |
name: Restore cache from exact key | |
uses: actions/cache/restore@v4 | |
with: | |
key: test.yml-ghc-${{ env.GHC_VER }}-stack-${{ env.STACK_VER }}-icu-${{ env.ICU_VER | |
}}-plan-${{ hashFiles('Agda.cabal','stack.yaml') }} | |
path: | | |
~/.stack | |
- name: Suite of tests for bugs | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" bugs | |
- if: always() | |
name: 'Suite of successful tests: mini-library Common' | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" common | |
- if: always() | |
name: Suite of successful tests | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" succeed | |
- if: always() | |
name: Suite of failing tests | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" fail | |
- if: always() | |
name: Suite of examples | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" examples | |
- if: always() | |
name: Suite of interactive tests | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" interactive | |
- if: always() | |
name: Successful tests using Agda as a Haskell library | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" api-test | |
- if: always() | |
name: Internal test suite | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" internal-tests | |
- if: always() | |
name: Compiler tests | |
run: make BUILD_DIR="${GITHUB_WORKSPACE}/${BUILD_DIR}" compiler-test | |
name: Build, Test, and Benchmark | |
'on': | |
pull_request: | |
paths: | |
- '**' | |
- '!.github/**' | |
- .github/workflows/test.yml | |
- '!src/github/**' | |
- src/github/workflows/test.yml | |
- '!doc/**' | |
- doc/user-manual/**/*.lagda.rst | |
- '!src/agda-bisect/**' | |
- '!src/fix-whitespace/**' | |
- '!src/hs-tags/**' | |
- '!src/release-tools/**' | |
- '!.travis' | |
- '!macros/**' | |
- '!notes/**' | |
- '!.mailmap' | |
- '!.gitignore' | |
- '!.hlint.yaml' | |
- '!.readthedocs.yaml' | |
- '!.travis.yml' | |
- '!CHANGELOG.md' | |
- '!HACKING.md' | |
- '!LICENSE' | |
- '!README.md' | |
- '!fix-whitespace.yaml' | |
- '!hie*.yaml' | |
- '!stack-*.yaml' | |
- '!touchup.sh' | |
push: | |
branches: | |
- master | |
- ci-* | |
- release* | |
paths: | |
- '**' | |
- '!.github/**' | |
- .github/workflows/test.yml | |
- '!src/github/**' | |
- src/github/workflows/test.yml | |
- '!doc/**' | |
- doc/user-manual/**/*.lagda.rst | |
- '!src/agda-bisect/**' | |
- '!src/fix-whitespace/**' | |
- '!src/hs-tags/**' | |
- '!src/release-tools/**' | |
- '!.travis' | |
- '!macros/**' | |
- '!notes/**' | |
- '!.mailmap' | |
- '!.gitignore' | |
- '!.hlint.yaml' | |
- '!.readthedocs.yaml' | |
- '!.travis.yml' | |
- '!CHANGELOG.md' | |
- '!HACKING.md' | |
- '!LICENSE' | |
- '!README.md' | |
- '!fix-whitespace.yaml' | |
- '!hie*.yaml' | |
- '!stack-*.yaml' | |
- '!touchup.sh' | |
workflow_dispatch: null |