Merge pull request #623 from keram/issue-622-idris-start-project-ipkg #261
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: Idris1 on Ubuntu | |
on: | |
push: | |
branches: | |
- '*' | |
tags: | |
- '*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
# -- [ Build ] | |
build: | |
# ---- [ Initialise Build Environment ] | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
strategy: | |
matrix: | |
emacs: [25.3, 26.1, 27.2, 28.2] | |
idris: [git, stackage] | |
env: | |
EMACS_VERSION: ${{ matrix.emacs }} | |
IDRIS_VERSION: ${{ matrix.idris }} | |
# ---- [ Steps to Run ] | |
steps: | |
# ----- [ Steps Dependencies ] | |
- name: Fetch Dependencies | |
run: sudo apt install -y libgc-dev libgif-dev libxaw7-dev openssl | |
# ----- [ Initialise Variables ] | |
- name: Initialise variables | |
run: | | |
mkdir -p $HOME/.local/bin | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
# ----- [ Emacs ] | |
- name: Fetch Emacs | |
uses: purcell/setup-emacs@master | |
with: | |
version: ${{ matrix.emacs }} | |
# ----- [ Caches ] | |
- name: Cache stack global package-db | |
id: stack-global | |
uses: actions/cache@v3 | |
with: | |
path: ~/.stack | |
key: ${{ runner.os }}-stack-global-${{ matrix.idris }} | |
restore-keys: | | |
${{ runner.os }}-stack-global-${{ matrix.idris }} | |
- name: Cache stack-installed programs in ~/.local/bin | |
id: stack-programs | |
uses: actions/cache@v3 | |
with: | |
path: ~/.local/bin | |
key: ${{ runner.os }}-stack-programs-${{ matrix.idris }} | |
restore-keys: | | |
${{ runner.os }}-stack-programs-${{ matrix.idris }} | |
- name: Cache .stack-work | |
uses: actions/cache@v3 | |
with: | |
path: .stack-work | |
key: ${{ runner.os }}-stack-work-${{ matrix.idris }} | |
restore-keys: | | |
${{ runner.os }}-stack-work-${{ matrix.idris }} | |
- name: Cache idris-dev-git/ | |
if: matrix.idris == 'git' | |
id: idris-dev-git | |
uses: actions/cache@v3 | |
with: | |
path: ~/idris-dev-git/ | |
key: ${{ runner.os }}-idris-dev-stack-work-${{ matrix.idris }} | |
restore-keys: | | |
${{ runner.os }}-idris-dev-stack-work-${{ matrix.idris }} | |
# ----- [ Idris from GIT ] | |
- name: Install Idris from GIT | |
if: matrix.idris == 'git' && steps.idris-dev-git.outputs.cache-hit != 'true' | |
run: | | |
pushd . | |
git clone https://github.com/idris-lang/Idris-dev.git ~/idris-dev-git | |
cd ~/idris-dev-git | |
stack --no-terminal install --flag idris:-FFI --flag idris:-GMP | |
popd | |
idris --info | |
# ----- [ Idris from Stack ] | |
- name: Install Idris from Stackage | |
if: matrix.idris == 'stackage' && steps.stack-program.outputs.cache-hit != 'true' | |
run: | | |
stack install --resolver lts-12.26 idris | |
# ----- [ Checkout and Run] | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Run Tests | |
run: | | |
make clean | |
make build | |
make test | |
# -- EOF |