Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add initial nightly build and refactor existing CI workflow #168

Merged
merged 8 commits into from
Dec 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading