mirror of
https://github.com/rojo-rbx/rojo.git
synced 2026-10-22 21:41:37 +00:00
chore: update CI configuration and Rust settings
- Added support for `lld-link` as the linker for both x86_64 and aarch64 Windows targets in `.cargo/config.toml`. - Updated CI workflows to use `Swatinem/rust-cache` for caching Rust dependencies, improving build efficiency. - Consolidated build and test steps in CI workflows, enhancing clarity and reducing redundancy. - Introduced a step to disable Windows Defender during CI runs on Windows to prevent interference with builds.
This commit is contained in:
parent
7e3e58a003
commit
1f5dacd218
3 changed files with 33 additions and 75 deletions
|
|
@ -1,2 +1,7 @@
|
||||||
[target.x86_64-pc-windows-msvc]
|
[target.x86_64-pc-windows-msvc]
|
||||||
rustflags = ["-Ctarget-feature=+crt-static"]
|
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||||
|
linker = "lld-link"
|
||||||
|
|
||||||
|
[target.aarch64-pc-windows-msvc]
|
||||||
|
rustflags = ["-Ctarget-feature=+crt-static"]
|
||||||
|
linker = "lld-link"
|
||||||
74
.github/workflows/ci.yml
vendored
74
.github/workflows/ci.yml
vendored
|
|
@ -20,6 +20,10 @@ jobs:
|
||||||
os: [ubuntu-22.04, windows-latest, macos-latest, windows-11-arm, ubuntu-22.04-arm]
|
os: [ubuntu-22.04, windows-latest, macos-latest, windows-11-arm, ubuntu-22.04-arm]
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- name: Disable Windows Defender
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
run: Set-MpPreference -DisableRealtimeMonitoring $true
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
@ -27,29 +31,13 @@ jobs:
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: dtolnay/rust-toolchain@stable
|
||||||
|
|
||||||
- name: Restore Rust Cache
|
- name: Rust Cache
|
||||||
uses: actions/cache/restore@v4
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build and Test
|
||||||
run: cargo build --locked --verbose
|
env:
|
||||||
|
CARGO_TERM_VERBOSE: ${{ runner.debug && 'true' || 'false' }}
|
||||||
- name: Test
|
run: cargo test --locked --all-targets
|
||||||
run: cargo test --locked --verbose
|
|
||||||
|
|
||||||
- name: Save Rust Cache
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
build-vscode:
|
build-vscode:
|
||||||
name: Build VS Code Extension
|
name: Build VS Code Extension
|
||||||
|
|
@ -85,26 +73,13 @@ jobs:
|
||||||
- name: Install Rust
|
- name: Install Rust
|
||||||
uses: dtolnay/rust-toolchain@1.88.0
|
uses: dtolnay/rust-toolchain@1.88.0
|
||||||
|
|
||||||
- name: Restore Rust Cache
|
- name: Rust Cache
|
||||||
uses: actions/cache/restore@v4
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build --locked --verbose
|
env:
|
||||||
|
CARGO_TERM_VERBOSE: ${{ runner.debug && 'true' || 'false' }}
|
||||||
- name: Save Rust Cache
|
run: cargo build --locked
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
lint:
|
lint:
|
||||||
name: Rustfmt, Clippy, Stylua, & Selene
|
name: Rustfmt, Clippy, Stylua, & Selene
|
||||||
|
|
@ -120,14 +95,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
components: rustfmt, clippy
|
components: rustfmt, clippy
|
||||||
|
|
||||||
- name: Restore Rust Cache
|
- name: Rust Cache
|
||||||
uses: actions/cache/restore@v4
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Setup Rokit
|
- name: Setup Rokit
|
||||||
uses: CompeyDev/setup-rokit@v0.1.2
|
uses: CompeyDev/setup-rokit@v0.1.2
|
||||||
|
|
@ -145,12 +114,3 @@ jobs:
|
||||||
|
|
||||||
- name: Clippy
|
- name: Clippy
|
||||||
run: cargo clippy
|
run: cargo clippy
|
||||||
|
|
||||||
- name: Save Rust Cache
|
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
|
||||||
27
.github/workflows/release.yml
vendored
27
.github/workflows/release.yml
vendored
|
|
@ -135,6 +135,10 @@ jobs:
|
||||||
env:
|
env:
|
||||||
BIN: atlas
|
BIN: atlas
|
||||||
steps:
|
steps:
|
||||||
|
- name: Disable Windows Defender
|
||||||
|
if: runner.os == 'Windows'
|
||||||
|
run: Set-MpPreference -DisableRealtimeMonitoring $true
|
||||||
|
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
|
@ -144,26 +148,15 @@ jobs:
|
||||||
with:
|
with:
|
||||||
targets: ${{ matrix.target }}
|
targets: ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Restore Rust Cache
|
- name: Rust Cache
|
||||||
uses: actions/cache/restore@v4
|
uses: Swatinem/rust-cache@v2
|
||||||
with:
|
with:
|
||||||
path: |
|
shared-key: release-${{ matrix.target }}
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Build Release
|
- name: Build Release
|
||||||
run: cargo build --release --locked --verbose --target ${{ matrix.target }}
|
env:
|
||||||
|
CARGO_TERM_VERBOSE: ${{ runner.debug && 'true' || 'false' }}
|
||||||
- name: Save Rust Cache
|
run: cargo build --release --locked --target ${{ matrix.target }}
|
||||||
uses: actions/cache/save@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ matrix.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
|
|
||||||
- name: Generate Artifact Name
|
- name: Generate Artifact Name
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue