Skip to content

Commit

Permalink
Merge branch 'main' into 779-build-arm-binaries-and-containers-for-li…
Browse files Browse the repository at this point in the history
…nux-and-macos
  • Loading branch information
mattheworris authored Mar 5, 2024
2 parents 08041ec + 8e4bdb2 commit 372a0f1
Show file tree
Hide file tree
Showing 19 changed files with 608 additions and 471 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/common/codecov/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,20 @@ runs:
steps:
- name: Install grcov
shell: bash
run: cargo +nightly-2023-07-13 install grcov
run: cargo install --locked grcov
- name: Build
shell: bash # Limited to 10 threads max
run: cargo +nightly-2023-07-13 build -j 10 --features frequency-lint-check
run: cargo build -j 10 --features frequency-lint-check
env:
RUSTC_BOOTSTRAP: 1
CARGO_INCREMENTAL: '0'
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
RUSTDOCFLAGS: "-Cpanic=abort"
- name: Test
shell: bash # Limited to 10 threads max
run: cargo +nightly-2023-07-13 test -j 10 --features frequency-lint-check
run: cargo test -j 10 --features frequency-lint-check
env:
RUSTC_BOOTSTRAP: 1
CARGO_INCREMENTAL: '0'
RUSTFLAGS: "-Zprofile -Ccodegen-units=1 -Copt-level=0 -Clink-dead-code -Coverflow-checks=off -Zpanic_abort_tests -Cpanic=abort"
RUSTDOCFLAGS: "-Cpanic=abort"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/create-issue-dependabot-alert-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
- name: Create GitHub Issue
if: github.event.pull_request.user.login == 'dependabot[bot]'
id: create-issue
uses: JasonEtco/create-an-issue@e27dddc79c92bc6e4562f268fffa5ed752639abd
uses: JasonEtco/create-an-issue@1b14a70e4d8dc185e5cc76d3bec9eab20257b2c5
with:
filename: .github/issues/dependabot-alert.template.md
- name: Link PR to New Issue
Expand Down
11 changes: 8 additions & 3 deletions .github/workflows/merge-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Check for Changed Files
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd
uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a
id: filter
with:
filters: |
Expand Down Expand Up @@ -84,7 +84,7 @@ jobs:
# ci-base-image is published IF and ONLY IF ci-base-image.dockerfile changes
# IMAGE_VERSION reflects the latest version of ci-base-image.dockerfile that has been published
IMAGE_NAME: ci-base-image
IMAGE_VERSION: 1.1.0
IMAGE_VERSION: 1.3.0
BRANCH_NAME: main
runs-on: ubuntu-22.04
steps:
Expand All @@ -96,6 +96,9 @@ jobs:
platforms: "amd64"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Rust Version
id: rust_version
run: echo "::set-output name=RUST_VERSION::$(rustc --version)"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -118,4 +121,6 @@ jobs:
${{steps.repo_slug.outputs.result}}/${{env.IMAGE_NAME}}:${{env.BRANCH_NAME}}
${{steps.repo_slug.outputs.result}}/${{env.IMAGE_NAME}}:latest
${{steps.repo_slug.outputs.result}}/${{env.IMAGE_NAME}}:${{env.IMAGE_VERSION}}
build-args: IMAGE_VERSION=${{env.IMAGE_VERSION}}
build-args: |
IMAGE_VERSION=${{env.IMAGE_VERSION}}
RUST_VERSION=${{steps.rust_version.outputs.RUST_VERSION}}
8 changes: 8 additions & 0 deletions .github/workflows/publish-dev-ci-base-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
env:
# IMAGE_NAME: ci-base-image-dind
IMAGE_NAME: ci-base-image
IMAGE_VERSION: 1.2.0
BRANCH_NAME: ${{github.ref_name}}
runs-on: macos-14
steps:
Expand Down Expand Up @@ -55,6 +56,10 @@ jobs:
platforms: "amd64"
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Rust Version
id: rust_version
run: |
echo "::set-output name=RUST_VERSION::$(rustc --version)"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
Expand All @@ -76,3 +81,6 @@ jobs:
file: tools/ci/docker/ci-base-image.dockerfile
tags: |
${{steps.repo_slug.outputs.result}}/${{env.IMAGE_NAME}}:${{env.BRANCH_NAME}}
build-args: |
IMAGE_VERSION=${{env.IMAGE_VERSION}}
RUST_VERSION=${{steps.rust_version.outputs.RUST_VERSION}}
12 changes: 6 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ env:
RELEASE_BRANCH_NAME: release-${{github.event.inputs.release-version || github.ref_name}}
LATEST_FULL_RELEASE_TAG: _LATEST-FULL-RELEASE
TEST_RUN: ${{startsWith(github.event.inputs.release-version || github.ref_name, 'v0.0.1')}}
RUST_TOOLCHAIN: "1.70.0" # Match to /rust-toolchain.toml
RUST_TOOLCHAIN: "stable" # Match to /rust-toolchain.toml

jobs:
validate-release-version:
Expand Down Expand Up @@ -319,11 +319,11 @@ jobs:
echo "runtime_filename_${{matrix.network}}=$release_wasm_filename" >> $GITHUB_OUTPUT
- name: Install srtool-cli
run: |
cargo install --git https://github.com/chevdor/srtool-cli
cargo install --locked --git https://github.com/chevdor/srtool-cli
srtool --version
- name: Build Deterministic WASM
run: |
RUST_LOG=debug SRTOOL_TAG="1.70.0" srtool build \
RUST_LOG=debug SRTOOL_TAG="1.75.0" srtool build \
--build-opts="'--features on-chain-release-build,no-metadata-docs,${{matrix.features}}'" \
--profile=${{matrix.build-profile}} \
--package=${{matrix.package}}
Expand Down Expand Up @@ -361,8 +361,8 @@ jobs:
uses: actions/configure-pages@v4
- name: Build Docs
run: |
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-07-13
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly-2023-07-13 doc --no-deps --workspace --features frequency
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-01
RUSTDOCFLAGS="--enable-index-page -Zunstable-options" cargo +nightly-2024-03-01 doc --no-deps --workspace --features frequency
- name: Fix file permissions
shell: sh
run: |
Expand Down Expand Up @@ -666,7 +666,7 @@ jobs:
echo "PREVIOUS_RELEASE_TAG=${{steps.get-previous-full-release-version.outputs.version}}" >> $GITHUB_ENV
- name: Install Tera CLI
run: |
cargo install --git https://github.com/chevdor/tera-cli
cargo install --locked --git https://github.com/chevdor/tera-cli
echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV
- name: Verify Tera CLI Install
run: |
Expand Down
14 changes: 7 additions & 7 deletions .github/workflows/verify-pr-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Check Out Repo
uses: actions/checkout@v4
- name: Check for Changed Files
uses: dorny/paths-filter@0bc4621a3135347011ad047f9ecf449bf72ce2bd
uses: dorny/paths-filter@ebc4d7e9ebcb0b1eb21480bb8f43113e996ac77a
id: filter
with:
filters: |
Expand Down Expand Up @@ -200,7 +200,7 @@ jobs:
uses: actions/checkout@v4
- name: Check
run: |
cargo +nightly-2023-07-13 fmt --check
cargo +nightly-2024-03-01 fmt --check
lint-rust-code:
needs: changes
Expand All @@ -213,7 +213,7 @@ jobs:
uses: actions/checkout@v4
- name: Lint
run: |
SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo +nightly-2023-07-13 clippy \
SKIP_WASM_BUILD=1 env -u RUSTFLAGS cargo clippy \
--features runtime-benchmarks,frequency-lint-check \
-- \
-D warnings
Expand All @@ -229,8 +229,8 @@ jobs:
uses: actions/checkout@v4
- name: Build Docs
run: |
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-07-13
RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo +nightly-2023-07-13 doc --no-deps --features frequency
rustup target add wasm32-unknown-unknown --toolchain nightly-2024-03-01
RUSTDOCFLAGS="--enable-index-page --check -Zunstable-options" cargo +nightly-2024-03-01 doc --no-deps --features frequency
verify-rust-packages-and-deps:
needs: changes
Expand Down Expand Up @@ -358,7 +358,7 @@ jobs:
if: steps.cache-wasm.outputs.cache-hit != 'true'
run: |
rustup show
cargo install --git https://github.com/chevdor/srtool-cli
cargo install --locked --git https://github.com/chevdor/srtool-cli
echo "PATH=$HOME/.cargo/bin:$PATH" >> $GITHUB_ENV
- name: Test srtool-cli Install
run: |
Expand All @@ -368,7 +368,7 @@ jobs:
- name: Build Deterministic WASM
if: steps.cache-wasm.outputs.cache-hit != 'true'
run: |
RUST_LOG=debug SRTOOL_TAG="1.70.0" srtool build \
RUST_LOG=debug SRTOOL_TAG="1.75.0" srtool build \
--build-opts="'--features on-chain-release-build,no-metadata-docs,${{matrix.features}}'" \
--profile=${{matrix.build-profile}} \
--package=${{matrix.package}}
Expand Down
Loading

0 comments on commit 372a0f1

Please sign in to comment.