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

Use nightly and profile zmall #3

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .cargo/config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[target.aarch64-unknown-linux-musl]
rustflags = ["-Clink-arg=-fuse-ld=lld"]

[target.armv7-unknown-linux-musleabihf]
rustflags = ["-Clink-arg=-fuse-ld=lld"]

[target.x86_64-unknown-linux-musl]
rustflags = ["-Clink-arg=-fuse-ld=lld"]

54 changes: 12 additions & 42 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
--userns host --user $(id -u):$(id -g) \
-v $HOME/.cargo/registry:/usr/local/cargo/registry \
-v ./:/project \
ghcr.io/cargo-prebuilt/ink-cross:stable-${{ matrix.target }} \
auditable build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }}
ghcr.io/cargo-prebuilt/ink-cross:nightly-${{ matrix.target }} \
auditable build --verbose --workspace --locked -Z build-std=std,panic_abort --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Run tests
if: ${{ matrix.can-test }}
run: |
Expand All @@ -64,38 +64,6 @@ jobs:
path: |
target/${{ matrix.target }}/debug/${{ env.bin-name }}

cross:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-freebsd
- target: x86_64-unknown-netbsd
- target: x86_64-unknown-illumos
- target: powerpc64-unknown-linux-gnu
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Update Rust and add target
run: |
rustup update
rustc --version
rustup target add ${{ matrix.target }}
- uses: cargo-prebuilt/cargo-prebuilt-action@v3
with:
pkgs: cross
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
run: cross build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.target }}
path: |
target/${{ matrix.target }}/debug/${{ env.bin-name }}

apple-darwin:
strategy:
fail-fast: false
Expand All @@ -112,17 +80,18 @@ jobs:
- uses: actions/checkout@v4
- name: Update Rust and add target
run: |
rustup update
rustc --version
rustup target add ${{ matrix.target }}
rustup toolchain install nightly
rustc +nightly --version
rustup component add rust-src --toolchain nightly
rustup target add ${{ matrix.target }} --toolchain nightly
- uses: cargo-prebuilt/cargo-prebuilt-action@v3
with:
pkgs: cargo-auditable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
run: cargo auditable build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }}
run: cargo +nightly auditable build --verbose --workspace --locked -Z build-std=std,panic_abort --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Run tests
if: ${{ matrix.can-test }}
run: |
Expand All @@ -148,17 +117,18 @@ jobs:
- uses: actions/checkout@v4
- name: Update Rust and add target
run: |
rustup update
rustc --version
rustup target add ${{ matrix.target }}
rustup toolchain install nightly
rustc +nightly --version
rustup component add rust-src --toolchain nightly
rustup target add ${{ matrix.target }} --toolchain nightly
- uses: cargo-prebuilt/cargo-prebuilt-action@v3
with:
pkgs: cargo-auditable
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
- name: Build
run: cargo auditable build --verbose --workspace --locked --target ${{ matrix.target }} ${{ env.feature-set }}
run: cargo +nightly auditable build --verbose --workspace --locked -Z build-std=std,panic_abort --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Artifact
uses: actions/upload-artifact@v4
with:
Expand Down
77 changes: 18 additions & 59 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:

publish-github-releases:
runs-on: ubuntu-latest
needs: [ release, check-fmt, clippy, ink-cross, cross, apple-darwin, pc-windows-msvc ]
needs: [ release, check-fmt, clippy, ink-cross, apple-darwin, pc-windows-msvc ]
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
Expand Down Expand Up @@ -147,8 +147,8 @@ jobs:
shell: bash
run: |
set -o pipefail
cargo clippy --all-targets --verbose --workspace --release --locked -- -D warnings 2>&1 | tee .step-data.txt
cargo clippy --all-targets --verbose --workspace --release --locked ${{ env.feature-set }} -- -D warnings 2>&1 | tee .step-data.txt
cargo clippy --all-targets --verbose --workspace --profile=zmall --locked -- -D warnings 2>&1 | tee .step-data.txt
cargo clippy --all-targets --verbose --workspace --profile=zmall --locked ${{ env.feature-set }} -- -D warnings 2>&1 | tee .step-data.txt
- name: Put into summary (success)
if: success()
shell: bash
Expand Down Expand Up @@ -191,12 +191,12 @@ jobs:
shell: bash
run: |
set -o pipefail
cargo hack check --each-feature --no-dev-deps --verbose --workspace --release --locked 2>&1 | tee .step-data.txt
cargo hack check --each-feature --no-dev-deps --verbose --workspace --profile=zmall --locked 2>&1 | tee .step-data.txt
- name: Hack Check (feature-powerset)
shell: bash
run: |
set -o pipefail
cargo hack check --feature-powerset ${{ env.hack-group }} --no-dev-deps --verbose --workspace --release --locked 2>&1 | tee .step-data.txt
cargo hack check --feature-powerset ${{ env.hack-group }} --no-dev-deps --verbose --workspace --profile=zmall --locked 2>&1 | tee .step-data.txt
- name: Put into summary (success)
if: success()
shell: bash
Expand Down Expand Up @@ -241,7 +241,7 @@ jobs:
shell: bash
run: |
set -o pipefail
cargo msrv verify -- cargo check --verbose --release --locked 2>&1 | tee .step-data.txt
cargo msrv verify -- cargo check --verbose --profile=zmall --locked 2>&1 | tee .step-data.txt
- name: Put into summary (success)
if: success()
shell: bash
Expand Down Expand Up @@ -359,8 +359,8 @@ jobs:
--userns host --user $(id -u):$(id -g) \
-v $HOME/.cargo/registry:/usr/local/cargo/registry \
-v ./:/project \
ghcr.io/cargo-prebuilt/ink-cross:stable-${{ matrix.target }} \
auditable build --verbose --workspace --release --locked --target ${{ matrix.target }} ${{ env.feature-set }}
ghcr.io/cargo-prebuilt/ink-cross:nightly-${{ matrix.target }} \
auditable build --verbose --workspace --profile=zmall --locked -Z build-std=std,panic_abort --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Run tests
if: ${{ matrix.can-test }}
run: |
Expand All @@ -379,49 +379,6 @@ jobs:
${{ env.bin-name }}-${{ matrix.target }}
${{ matrix.target }}.sha256

cross:
strategy:
fail-fast: false
matrix:
include:
- target: x86_64-unknown-freebsd
can-test: false
- target: x86_64-unknown-netbsd
can-test: false
- target: x86_64-unknown-illumos
can-test: false
- target: powerpc64-unknown-linux-gnu
can-test: true
runs-on: ubuntu-latest
needs: [ check-fmt, clippy, cargo-hack, cargo-msrv, cargo-deny ]
steps:
- uses: actions/checkout@v4
- name: Update Rust and add target
run: |
rustup update
rustc --version
rustup target add ${{ matrix.target }}
- uses: cargo-prebuilt/cargo-prebuilt-action@v3
with:
pkgs: cross,coreutils
- uses: Swatinem/rust-cache@v2
if: ${{ env.cache == 'true' }}
- name: Build
run: cross build --verbose --workspace --release --locked --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Rename
run: cp ./target/${{ matrix.target }}/release/${{ env.bin-name }} ./${{ env.bin-name }}-${{ matrix.target }}
- name: Chmod
run: chmod +x ./${{ env.bin-name }}-${{ matrix.target }}
- name: Hash
run: echo "$(coreutils sha256sum ./${{ env.bin-name }}-${{ matrix.target }})" > ${{ matrix.target }}.sha256
- name: Artifact
uses: actions/upload-artifact@v4
with:
name: target-${{ matrix.target }}
path: |
${{ env.bin-name }}-${{ matrix.target }}
${{ matrix.target }}.sha256

apple-darwin:
strategy:
fail-fast: false
Expand All @@ -437,16 +394,17 @@ jobs:
- uses: actions/checkout@v4
- name: Update Rust and add target
run: |
rustup update
rustc --version
rustup target add ${{ matrix.target }}
rustup toolchain install nightly
rustc +nightly --version
rustup component add rust-src --toolchain nightly
rustup target add ${{ matrix.target }} --toolchain nightly
- uses: cargo-prebuilt/cargo-prebuilt-action@v3
with:
pkgs: cargo-auditable,coreutils
- uses: Swatinem/rust-cache@v2
if: ${{ env.cache == 'true' }}
- name: Build
run: cargo auditable build --verbose --workspace --release --locked --target ${{ matrix.target }} ${{ env.feature-set }}
run: cargo +nightly auditable build --verbose --workspace --profile=zmall --locked -Z build-std=std,panic_abort --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Run tests
if: ${{ matrix.can-test }}
run: |
Expand Down Expand Up @@ -480,16 +438,17 @@ jobs:
- uses: actions/checkout@v4
- name: Update Rust and add target
run: |
rustup update
rustc --version
rustup target add ${{ matrix.target }}
rustup toolchain install nightly
rustc +nightly --version
rustup component add rust-src --toolchain nightly
rustup target add ${{ matrix.target }} --toolchain nightly
- uses: cargo-prebuilt/cargo-prebuilt-action@v3
with:
pkgs: cargo-auditable,coreutils
- uses: Swatinem/rust-cache@v2
if: ${{ env.cache == 'true' }}
- name: Build
run: cargo auditable build --verbose --workspace --release --locked --target ${{ matrix.target }} ${{ env.feature-set }}
run: cargo +nightly auditable build --verbose --workspace --profile=zmall --locked -Z build-std=std,panic_abort --target ${{ matrix.target }} ${{ env.feature-set }}
- name: Rename
run: cp ./target/${{ matrix.target }}/release/${{ env.bin-name }}.exe ./${{ env.bin-name }}-${{ matrix.target }}.exe
- name: Hash
Expand Down
Loading
Loading