-
Notifications
You must be signed in to change notification settings - Fork 106
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
141 additions
and
106 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,20 @@ | ||
name: "Shared OCaml setting up steps" | ||
description: "Shared OCaml setting up steps" | ||
inputs: | ||
ocaml_version: | ||
description: "OCaml version" | ||
required: true | ||
shell: | ||
description: "Shell to use" | ||
required: false | ||
default: "bash" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup OCaml ${{ inputs.ocaml_version }} | ||
uses: ocaml/setup-ocaml@v2 | ||
with: | ||
ocaml-compiler: ${{ inputs.ocaml_version }} | ||
# https://github.com/ocaml/setup-ocaml/issues/211#issuecomment-1058882386 | ||
# disable-cache: true | ||
shell: ${{ inputs.shell }} |
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,26 @@ | ||
name: "Shared Rust toolchain setting up steps" | ||
description: "Shared Rust toolchain setting up steps" | ||
inputs: | ||
rust_toolchain_version: | ||
description: "Rust toolchain version" | ||
required: true | ||
shell: | ||
description: "Shell to use" | ||
required: false | ||
default: "bash" | ||
runs: | ||
using: "composite" | ||
steps: | ||
# As action-rs does not seem to be maintained anymore, building from | ||
# scratch the environment using rustup | ||
- name: Setup Rust toolchain ${{ inputs.rust_toolchain_version }} | ||
run: | | ||
curl --proto '=https' --tlsv1.2 -sSf -o rustup-init \ | ||
https://static.rust-lang.org/rustup/dist/x86_64-unknown-linux-gnu/rustup-init | ||
chmod +x ./rustup-init | ||
./rustup-init -y --default-toolchain "${{ inputs.rust_toolchain_version }}" --profile default | ||
rm ./rustup-init | ||
echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
# overwriting default rust-toolchain | ||
echo ${{ inputs.rust_toolchain_version }} > rust-toolchain | ||
shell: ${{ inputs.shell }} |
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,63 @@ | ||
# | ||
# This workflow is triggered nightly (or on-demand) to run all the tests with the code coverage enabled and using the self-hosted GitHub runner. | ||
# | ||
|
||
name: Nightly tests with code coverage | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * *" | ||
workflow_dispatch: {} | ||
|
||
env: | ||
# https://doc.rust-lang.org/cargo/reference/profiles.html#release | ||
RUSTFLAGS: -Coverflow-checks=y -Cdebug-assertions=y | ||
# https://doc.rust-lang.org/cargo/reference/profiles.html#incremental | ||
CARGO_INCREMENTAL: 1 | ||
# https://nexte.st/book/pre-built-binaries.html#using-nextest-in-github-actions | ||
CARGO_TERM_COLOR: always | ||
RUST_MIN_STACK: 31457280 | ||
# 30 MB of stack for Keccak tests | ||
|
||
jobs: | ||
run_tests: | ||
name: Run all tests with the code coverage | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
# FIXME: use the latest version of cargo nextest when we get rid of 1.71 | ||
# and 1.72 | ||
rust_toolchain_version: ["1.74"] | ||
# FIXME: currently not available for 5.0.0. | ||
# It might be related to boxroot dependency, and we would need to bump | ||
# up the ocaml-rs dependency | ||
ocaml_version: ["4.14"] | ||
os: ["hetzner-1"] | ||
steps: | ||
- name: Checkout PR | ||
uses: actions/checkout@v4.1.1 | ||
|
||
- name: Use shared Rust toolchain setting up steps | ||
uses: ./.github/actions/toolchain-shared | ||
with: | ||
rust_toolchain_version: ${{ matrix.rust_toolchain_version }} | ||
|
||
- name: Use shared OCaml setting up steps | ||
uses: ./.github/actions/ocaml-shared | ||
with: | ||
ocaml_version: ${{ matrix.ocaml_version }} | ||
|
||
- name: Install test dependencies | ||
run: | | ||
make install-test-deps | ||
- name: Run all tests | ||
if: ${{ matrix.rust_toolchain_version == '1.74' }} | ||
run: | | ||
eval $(opam env) | ||
make nextest-all-with-coverage | ||
- name: Use shared Codecov reporting steps | ||
uses: ./.github/actions/codecov-shared | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} |
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
This file was deleted.
Oops, something went wrong.