Skip to content

Commit

Permalink
Add reproducible builds (#534)
Browse files Browse the repository at this point in the history
* Added cargo-make, updated ci, added version script, added rust-toolchain

* Updated test ci

* Updated all cargo.toml + updated test command in Makefile

* Added cargo-make to README

* Update test CI naming

* Update Makefile and Readme with Bobbin's requirements

* Add doc-serce command and update script

* Added cargo-make, updated ci, added version script, added rust-toolchain

* Revert "Added cargo-make, updated ci, added version script, added rust-toolchain"

This reverts commit a159eb4.

* Removed additional white lines
  • Loading branch information
phklive authored Mar 25, 2024
1 parent 1076f9d commit 86a8127
Show file tree
Hide file tree
Showing 18 changed files with 1,599 additions and 163 deletions.
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

0 comments on commit 86a8127

Please sign in to comment.