Skip to content

Commit

Permalink
Add initial nightly build and refactor existing CI workflow (#168)
Browse files Browse the repository at this point in the history
* Add initial nightly build and refactor existing CI workflow

* Remove test workflow

* Make cairo dependencies patch

* Remove temporary triggers for ci and nightly workflows

* Change version to match compiler's

* Add dependecies comment

* Add sync version xtask
  • Loading branch information
wawel37 authored Dec 17, 2024
1 parent e049d15 commit 8291765
Show file tree
Hide file tree
Showing 10 changed files with 433 additions and 366 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on:
push:
branches:
- main
pull_request:
merge_group:

permissions:
contents: read

jobs:
checks:
name: Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
components: rustfmt

- name: Run cargo fmt
run: cargo +nightly fmt --check

- uses: dtolnay/rust-toolchain@stable
- name: Run cargo clippy
run: cargo clippy -- -D warnings
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Get corelib
run: git clone https://github.com/starkware-libs/cairo
- name: Run cargo test
run: CORELIB_PATH="$(pwd)/cairo/corelib/src" cargo test
23 changes: 23 additions & 0 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Nightly

on:
schedule:
- cron: "0 0 * * *"

permissions:
contents: read

jobs:
build:
name: Build nightly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable

- name: Upgrade Cairo to latest main commit
run: cargo xtask upgrade cairo --rev $(git ls-remote --refs "https://github.com/starkware-libs/cairo" main | awk '{print $1}')
- name: Get corelib
run: git clone https://github.com/starkware-libs/cairo
- name: Run cargo test
run: CORELIB_PATH="$(pwd)/cairo/corelib/src" cargo test
27 changes: 0 additions & 27 deletions .github/workflows/test.yml

This file was deleted.

Loading

0 comments on commit 8291765

Please sign in to comment.