Skip to content

Commit

Permalink
ci: rewrite
Browse files Browse the repository at this point in the history
  • Loading branch information
zshipko committed Jan 22, 2024
1 parent 836a207 commit f4a1764
Showing 1 changed file with 41 additions and 12 deletions.
53 changes: 41 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,49 @@ on:
name: CI

jobs:
update_lean_xyz_branch_and_build:
runs-on: ubuntu-latest
name: Update lean-x.y.z branch and build project
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: checkout project
uses: actions/checkout@v2
with:
fetch-depth: 0
- 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: update branch
if: github.ref == 'refs/heads/master'
uses: leanprover-contrib/update-versions-action@master
- name: Test elan & lean are working
run: |
elan --version
lean --version
- name: build project
uses: leanprover-contrib/lean-build-action@master
- name: Build everything
run: |
lake build
- name: Run the test
run: |
lake exe test

0 comments on commit f4a1764

Please sign in to comment.