CI #2
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
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 |