Skip to content

Commit

Permalink
ci: use setup rust action
Browse files Browse the repository at this point in the history
  • Loading branch information
shiqimei committed Jun 14, 2023
1 parent e38fd09 commit 5a1e3fa
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 28 deletions.
20 changes: 6 additions & 14 deletions .github/workflows/cmake-debug.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,12 @@ jobs:
~/.ninja
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust
run: |
if ! command -v curl &> /dev/null
then
sudo apt-get update && sudo apt-get install -y curl
fi
if ! command -v rustup &> /dev/null
then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
else
rustup default nightly
fi
env:
PATH: ${{ github.workspace }}/.cargo/bin:$PATH
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Install cbindgen
run: |
Expand Down
20 changes: 6 additions & 14 deletions .github/workflows/cmake-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,20 +23,12 @@ jobs:
~/.ninja
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}

- name: Setup Rust
run: |
if ! command -v curl &> /dev/null
then
sudo apt-get update && sudo apt-get install -y curl
fi
if ! command -v rustup &> /dev/null
then
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain nightly
else
rustup default nightly
fi
env:
PATH: ${{ github.workspace }}/.cargo/bin:$PATH
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true

- name: Install cbindgen
run: |
Expand Down

0 comments on commit 5a1e3fa

Please sign in to comment.