Skip to content

Commit

Permalink
chore: add GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tydeu committed Oct 26, 2023
1 parent 573a453 commit 405bf32
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: CI

on:
push:
branches:
- master
- 'stage/**'
pull_request:

jobs:
build:
name: ${{ matrix.name || 'Build' }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ matrix.shell || 'sh' }}
strategy:
matrix:
include:
- name: Ubuntu
os: ubuntu-latest
- name: MacOS
os: macos-latest
- name: Windows
os: windows-latest
shell: msys2 {0}
# complete all jobs
fail-fast: false
steps:
- name: Install MSYS2 (Windows)
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: curl unzip
- name: Install Elan
shell: bash -euo pipefail {0}
run: |
curl -sSfL https://raw.githubusercontent.com/leanprover/elan/master/elan-init.sh | sh -s -- -y --default-toolchain none
echo "$HOME/.elan/bin" >> $GITHUB_PATH
- name: Checkout
uses: actions/checkout@v2
- name: Check Lean
run: lean --version
- name: Build
run: lake build
- name: Upload Build
continue-on-error: true
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}
path: build
- name: Test
run: ./test.sh
3 changes: 3 additions & 0 deletions Partax/Test.lean
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import Partax
import Partax.Test.Basic
import Partax.Test.LCompile
6 changes: 6 additions & 0 deletions test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/usr/bin/env bash
set -euxo pipefail

${LAKE:-lake} build Partax.Test
find tests -type f -exec ${LAKE:-lake} env lean {} \;
echo "all done"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit 405bf32

Please sign in to comment.