Skip to content

Commit

Permalink
Additional workflows refactoring and more debug logging to track the …
Browse files Browse the repository at this point in the history
…issue.
  • Loading branch information
shimkiv committed Aug 29, 2024
1 parent 14dc1cf commit 2b8ca45
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 46 deletions.
40 changes: 14 additions & 26 deletions .github/workflows/benches.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,47 +9,35 @@ env:
OCAML_VERSION: "4.14.0"
RUST_TOOLCHAIN_VERSION: "1.71"


jobs:
bench:
runs-on: ubuntu-latest
name: Run benchmarks
if: github.event.label.name == 'benchmark'
steps:
- name: Checkout PR
- name: Checkout repository
uses: actions/checkout@v4.1.1

# as action-rs does not seem to be maintained anymore, building from
# scratch the environment using rustup
- name: Setup Rust toolchain $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 "$RUST_TOOLCHAIN_VERSION" --profile default
rm ./rustup-init
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# overwriting default rust-toolchain
echo $RUST_TOOLCHAIN_VERSION > rust-toolchain
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ env.RUST_TOOLCHAIN_VERSION }}

- name: Install dependencies
run: |
set -x
cargo install cargo-criterion # criterion
cargo install cargo-criterion
- name: Setup OCaml ${{ env.OCAML_VERSION }}
uses: ocaml/setup-ocaml@v2
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml-compiler: ${{ env.OCAML_VERSION }}
# https://github.com/ocaml/setup-ocaml/issues/211#issuecomment-1058882386
# disable-cache: true
ocaml_version: ${{ env.OCAML_VERSION }}

# - name: Run iai bench
# run: |
# set -x
# cargo bench -p kimchi --bench proof_iai > iai_bench
# cat iai_bench
# - name: Run iai bench
# run: |
# set -x
# cargo bench -p kimchi --bench proof_iai > iai_bench
# cat iai_bench

- name: Run criterion bench
run: |
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,18 @@ jobs:
# TODO: Remove debug logging
- name: Echo tollchain version and environment
run: |
echo rustc --version
rustc --version
echo ""
cargo --version
echo ""
echo $GITHUB_PATH
echo ""
echo $PATH
echo ""
echo $CARGO_HOME
echo ""
cat rust-toolchain
echo ""
env
#
Expand Down
27 changes: 8 additions & 19 deletions .github/workflows/gh-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,18 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout Repository
- name: Checkout repository
uses: actions/checkout@v4.1.1

# as action-rs does not seem to be maintained anymore, building from
# scratch the environment using rustup
- name: Setup nightly Rust toolchain
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 "$RUST_TOOLCHAIN_VERSION" --profile default
rm ./rustup-init
echo "$HOME/.cargo/bin" >> $GITHUB_PATH
# overwriting default rust-toolchain
echo $RUST_TOOLCHAIN_VERSION > rust-toolchain
- name: Use shared Rust toolchain setting up steps
uses: ./.github/actions/toolchain-shared
with:
rust_toolchain_version: ${{ env.RUST_TOOLCHAIN_VERSION }}

- name: Setup OCaml ${{ env.OCAML_VERSION }}
uses: ocaml/setup-ocaml@v2
- name: Use shared OCaml setting up steps
uses: ./.github/actions/ocaml-shared
with:
ocaml-compiler: ${{ env.OCAML_VERSION }}
# https://github.com/ocaml/setup-ocaml/issues/211#issuecomment-1058882386
# disable-cache: true
ocaml_version: ${{ env.OCAML_VERSION }}

# This must be the same as in the section "Generate rustdoc locally" in the README.md
- name: Build Rust Documentation
Expand Down

0 comments on commit 2b8ca45

Please sign in to comment.