Skip to content

CI

CI #2

Workflow file for this run

on:
pull_request:
workflow_dispatch:
name: CI
jobs:
build:
strategy:
matrix:
include:
- name: Linux
os: ubuntu-latest
- name: Windows
os: windows-latest
- name: macOS
os: macos-latest
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Setup elan toolchain on Linux or macOS
if: matrix.os == 'ubuntu-latest' || matrix.os == 'macos-latest'
run: |
curl -O --location https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh
chmod u+x elan-init.sh
./elan-init.sh -y --default-toolchain leanprover/lean4:nightly
echo "Adding location $HOME/.elan/bin to PATH..."
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Setup elan toolchain on Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
curl -O --location https://raw.githubusercontent.com/leanprover/elan/master/elan-init.ps1
.\elan-init.ps1 -NoPrompt 1 -DefaultToolchain leanprover/lean4:nightly
echo "Adding location $HOME\.elan\bin to PATH..."
echo "$HOME\.elan\bin" >> $env:GITHUB_PATH
- name: Test elan & lean are working
run: |
elan --version
lean --version
- name: Build everything
run: |
lake build
- name: Run the test
run: |
lake exe test