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 reproducible builds #534

Merged
merged 11 commits into from
Mar 25, 2024
105 changes: 0 additions & 105 deletions .github/workflows/ci.yml

This file was deleted.

53 changes: 53 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Runs linting related jobs.

name: lint

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

jobs:
version:
name: check rust version consistency
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
profile: minimal
override: true
- name: check rust versions
run: ./scripts/check-rust-version.sh

rustfmt:
name: rustfmt nightly on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install minimal Rust with rustfmt & cargo-make
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
components: rustfmt
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo make - format
run: cargo make format

clippy:
name: clippy stable on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install minimal Rust with clippy & cargo-make
uses: actions-rs/toolchain@v1
with:
profile: minimal
components: clippy
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo make - clippy
run: cargo make clippy
30 changes: 30 additions & 0 deletions .github/workflows/no-std.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# Runs no-std related jobs.

name: no-std

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

jobs:
no-std:
name: build ${{matrix.toolchain}} no-std for wasm32-unknown-unknown
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{matrix.toolchain}}
override: true
- run: rustup target add wasm32-unknown-unknown
- uses: davidB/rust-cargo-make@v1
- name: cargo make - build-no-std
run: cargo make build-no-std
32 changes: 32 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# Runs testing related jobs.

name: test

on:
push:
branches:
- main
pull_request:
types: [opened, reopened, synchronize]

jobs:
test:
name: test ${{matrix.toolchain}} on ${{matrix.os}} with ${{matrix.args}}
runs-on: ${{matrix.os}}-latest
strategy:
fail-fast: false
matrix:
toolchain: [stable, nightly]
os: [ubuntu]
args: ["default", "prove"]
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: ${{matrix.toolchain}}
override: true
- uses: davidB/rust-cargo-make@v1
- name: cargo make - test
run: cargo make test-${{matrix.args}}
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,6 @@
# will have compiled files and executables
/target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

Expand All @@ -22,4 +18,4 @@ env/
*.out
node_modules/
*DS_Store
*.iml
*.iml
Loading
Loading