Update tested-with #39
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: Build | |
on: | |
- push | |
- pull_request | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
main: | |
name: GHC ${{ matrix.ghc }} on ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
ghc: | |
- "9.2" | |
- "9.4" | |
- "9.6" | |
- "9.8" | |
include: | |
- os: macOS-latest | |
ghc: "9.8" | |
- os: windows-latest | |
ghc: "9.8" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: jcs090218/setup-emacs@master | |
with: | |
version: "28.2" | |
- uses: haskell/actions/setup@v2 | |
id: setup-haskell-cabal | |
with: | |
ghc-version: ${{ matrix.ghc }} | |
cabal-version: "latest" | |
cabal-update: true | |
- uses: actions/cache@v3 | |
name: Cache cabal stuff | |
with: | |
path: | | |
${{ steps.setup-haskell-cabal.outputs.cabal-store }} | |
dist-newstyle | |
key: ${{ runner.os }}-${{ matrix.ghc }} | |
- name: Versions | |
run: | | |
cabal --version | |
emacs --version | |
- name: Build | |
run: | | |
cabal build all --builddir dist --project-file cabal.project.ci | |
- name: Test | |
run: | | |
DYNAMIC_MODULE=$(find dist -name 'libemacs-module-test.*' -o -name 'emacs-module-test.dll') | |
DYNAMIC_MODULE_DIR=$(dirname "$DYNAMIC_MODULE") | |
DYNAMIC_MODULE_FILE=$(basename "$DYNAMIC_MODULE") | |
echo "Emacs module is built at $DYNAMIC_MODULE" | |
echo emacs -Q --batch --module-assertions -L "$DYNAMIC_MODULE_DIR" -L "test/elisp" -l "$DYNAMIC_MODULE_FILE" -l haskell-emacs-module-test -f ert-run-tests-batch-and-exit | |
emacs -Q --batch --module-assertions -L "$DYNAMIC_MODULE_DIR" -L "test/elisp" -l "$DYNAMIC_MODULE_FILE" -l haskell-emacs-module-test -f ert-run-tests-batch-and-exit | |
- name: Unpack | |
run: | | |
cabal sdist --ignore-project --output-directory .. | |
cd .. | |
cabal get emacs-module-*.tar.gz | |
- name: Cabal check | |
run: | | |
cd ../emacs-module-*/ | |
cabal check | |
- name: Build fresh | |
run: | | |
cd ../emacs-module-*/ | |
cabal build all |