ci: add RUSTFLAGS environment variable to CI workflows
- Introduced RUSTFLAGS environment variable in Python, Rust, and WASM CI workflows to override target-cpu settings from .cargo/config.toml, ensuring consistent build configurations across different environments.
This commit is contained in:
@@ -28,6 +28,8 @@ jobs:
|
|||||||
typecheck:
|
typecheck:
|
||||||
name: Type checking (mypy + pyright)
|
name: Type checking (mypy + pyright)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-python@v6
|
- uses: actions/setup-python@v6
|
||||||
@@ -49,6 +51,8 @@ jobs:
|
|||||||
build-wheel:
|
build-wheel:
|
||||||
name: Build wheel (ubuntu / Python ${{ matrix.python-version }})
|
name: Build wheel (ubuntu / Python ${{ matrix.python-version }})
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
||||||
|
|||||||
@@ -57,6 +57,8 @@ jobs:
|
|||||||
rust-lint:
|
rust-lint:
|
||||||
name: Rust fmt + clippy
|
name: Rust fmt + clippy
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@v1
|
||||||
@@ -75,6 +77,8 @@ jobs:
|
|||||||
rust-core:
|
rust-core:
|
||||||
name: Rust core (build + test)
|
name: Rust core (build + test)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@v1
|
||||||
@@ -91,6 +95,8 @@ jobs:
|
|||||||
name: Rust coverage (tarpaulin)
|
name: Rust coverage (tarpaulin)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@v1
|
||||||
@@ -114,6 +120,8 @@ jobs:
|
|||||||
name: Fuzz targets (short CI run)
|
name: Fuzz targets (short CI run)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: dtolnay/rust-toolchain@v1
|
- uses: dtolnay/rust-toolchain@v1
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ jobs:
|
|||||||
wasm:
|
wasm:
|
||||||
name: WASM (test + build + bench)
|
name: WASM (test + build + bench)
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
env:
|
||||||
|
RUSTFLAGS: "" # override target-cpu=native from .cargo/config.toml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- uses: actions/checkout@v6
|
||||||
- uses: actions/setup-node@v6
|
- uses: actions/setup-node@v6
|
||||||
|
|||||||
Reference in New Issue
Block a user