refactor: simplify Rust toolchain installation and remove redundant steps in CI workflows
parent
632425a70d
commit
e0bc525b61
|
@ -27,26 +27,19 @@ jobs:
|
||||||
artifact_name: gemini-keychecker
|
artifact_name: gemini-keychecker
|
||||||
release_name: gemini-keychecker-linux-aarch64
|
release_name: gemini-keychecker-linux-aarch64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust stable toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
targets: ${{ matrix.target_triple }}
|
targets: ${{ matrix.target_triple }}
|
||||||
|
override: true
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build project
|
- name: Build for ${{ matrix.target }}
|
||||||
run: cargo build --release --target ${{ matrix.target_triple }}
|
run: cargo build --release --target ${{ matrix.target_triple }}
|
||||||
|
|
||||||
- name: Package artifact
|
- name: Package artifact
|
||||||
|
@ -71,26 +64,19 @@ jobs:
|
||||||
artifact_name: gemini-keychecker.exe
|
artifact_name: gemini-keychecker.exe
|
||||||
release_name: gemini-keychecker-windows-x86_64
|
release_name: gemini-keychecker-windows-x86_64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust stable toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
targets: ${{ matrix.target_triple }}
|
targets: ${{ matrix.target_triple }}
|
||||||
|
override: true
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build project
|
- name: Build for ${{ matrix.target }}
|
||||||
run: cargo build --release --target ${{ matrix.target_triple }}
|
run: cargo build --release --target ${{ matrix.target_triple }}
|
||||||
|
|
||||||
- name: Package artifact
|
- name: Package artifact
|
||||||
|
@ -120,26 +106,19 @@ jobs:
|
||||||
artifact_name: gemini-keychecker
|
artifact_name: gemini-keychecker
|
||||||
release_name: gemini-keychecker-macos-aarch64
|
release_name: gemini-keychecker-macos-aarch64
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- uses: actions/checkout@v4
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
- name: Install Rust stable toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
profile: minimal
|
||||||
targets: ${{ matrix.target_triple }}
|
targets: ${{ matrix.target_triple }}
|
||||||
|
override: true
|
||||||
|
|
||||||
- name: Cache cargo dependencies
|
- uses: Swatinem/rust-cache@v2
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.cargo/registry
|
|
||||||
~/.cargo/git
|
|
||||||
target
|
|
||||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-cargo-
|
|
||||||
|
|
||||||
- name: Build project
|
- name: Build for ${{ matrix.target }}
|
||||||
run: cargo build --release --target ${{ matrix.target_triple }}
|
run: cargo build --release --target ${{ matrix.target_triple }}
|
||||||
|
|
||||||
- name: Package artifact
|
- name: Package artifact
|
||||||
|
|
Loading…
Reference in New Issue