-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Similar to Pulse
- Loading branch information
Showing
2 changed files
with
111 additions
and
116 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,111 @@ | ||
name: Steel CI | ||
on: | ||
push: | ||
branches-ignore: | ||
- _** | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
ci: | ||
runs-on: ubuntu-latest | ||
container: mtzguido/dev-base | ||
steps: | ||
- name: Cleanup | ||
run: sudo find . -delete | ||
|
||
- run: echo "HOME=/home/user" | sudo tee -a $GITHUB_ENV | ||
- uses: mtzguido/set-opam-env@master | ||
|
||
- uses: actions/checkout@master | ||
id: checkout-fstar | ||
with: | ||
path: FStar | ||
repository: FStarLang/FStar | ||
ref: master | ||
|
||
- name: Try fetch built F* | ||
id: cache-fstar | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: FStar | ||
key: FStar-${{ runner.os }}-${{ runner.arch }}-${{ steps.checkout-fstar.outputs.commit }} | ||
|
||
- name: Build F* | ||
if: steps.cache-fstar.outputs.cache-hit != 'true' | ||
run: | | ||
make -C FStar ADMIT=1 -sj$(nproc) | ||
- name: Save built F* | ||
if: steps.cache-fstar.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: FStar | ||
key: FStar-${{ runner.os }}-${{ runner.arch }}-${{ steps.checkout-fstar.outputs.commit }} | ||
|
||
- run: echo "FSTAR_EXE=$(pwd)/FStar/bin/fstar.exe" | sudo tee -a $GITHUB_ENV | ||
- run: echo "FSTAR_HOME=$(pwd)/FStar" | sudo tee -a $GITHUB_ENV | ||
- run: echo "PATH=$(pwd)/FStar/bin:$PATH" | sudo tee -a $GITHUB_ENV | ||
|
||
- uses: actions/checkout@master | ||
id: checkout-karamel | ||
with: | ||
path: karamel | ||
repository: FStarLang/karamel | ||
ref: master | ||
|
||
- name: Try fetch built karamel | ||
id: cache-karamel | ||
uses: actions/cache/restore@v4 | ||
with: | ||
path: karamel | ||
key: karamel-${{ runner.os }}-${{ runner.arch }}-${{ steps.checkout-fstar.outputs.commit }}-${{ steps.checkout-karamel.outputs.commit }} | ||
|
||
- name: Build karamel (if not cached) | ||
if: steps.cache-karamel.outputs.cache-hit != 'true' | ||
run: | | ||
make -C karamel -sj$(nproc) | ||
- name: Save built karamel | ||
if: steps.cache-karamel.outputs.cache-hit != 'true' | ||
uses: actions/cache/save@v4 | ||
with: | ||
path: karamel | ||
key: karamel-${{ runner.os }}-${{ runner.arch }}-${{ steps.checkout-fstar.outputs.commit }}-${{ steps.checkout-karamel.outputs.commit }} | ||
|
||
- run: echo "KRML_HOME=$(pwd)/karamel" | sudo tee -a $GITHUB_ENV | ||
|
||
- uses: actions/checkout@master | ||
with: | ||
path: steel | ||
|
||
- name: Steel CI | ||
id: cistep | ||
run: make -C steel ci -skj$(nproc) | ||
|
||
- name: Calculate Time | ||
if: ${{ always () }} | ||
id: duration | ||
uses: RockyIsHere/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Post result to Zulip | ||
if: ${{ always () }} # && secrets.ZULIP_API_KEY != '' }} | ||
continue-on-error: true | ||
uses: zulip/github-actions-zulip/send-message@v1 | ||
with: | ||
api-key: ${{ secrets.ZULIP_API_KEY }} | ||
email: "[email protected]" | ||
organization-url: "https://fstar.zulipchat.com" | ||
to: "steel-ci" | ||
type: "stream" | ||
topic: "CI on '${{github.ref_name}}'" | ||
content: | | ||
'${{ github.event.head_commit.message || github.event.pull_request.title || github.head_commit.message }}' by ${{ github.event.head_commit.author.username || github.event.pull_request.user.login || github.head_commit.author.username }} (commit [${{github.sha}}](${{ github.event.head_commit.url || github.even.pull_request.html_url}})) | ||
Status: ${{ steps.cistep.outcome == 'success' && '✅' || steps.cistep.outcome == 'cancelled' && '⚠' || '❌' }} ([link](https://github.com/${{github.repository}}/actions/runs/${{github.run_id}})) | ||
Elapsed time: ${{ steps.duration.outputs.duration }} |
This file was deleted.
Oops, something went wrong.