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

ci: switch to dtolnay/rust-toolchain #699

Merged
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
8 changes: 2 additions & 6 deletions .github/workflows/devtools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,14 @@ jobs:
submodules: recursive

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
override: true

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
override: true

- name: Preparation work
run: make preparation
Expand Down
17 changes: 4 additions & 13 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,9 @@ jobs:
uses: ilammy/setup-nasm@v1

- name: Install toolchain with clippy available
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly-2023-12-31
override: true
components: clippy

- name: Add target
Expand Down Expand Up @@ -65,23 +63,16 @@ jobs:
submodules: recursive

- name: Install toolchain with rustfmt available
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: minimal
toolchain: nightly-2023-12-31
override: true
components: rustfmt

- name: Preparation Work
run: make preparation

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all -- --check
19 changes: 4 additions & 15 deletions .github/workflows/fuzz.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,22 @@ jobs:
- uses: actions/checkout@v4
with:
submodules: recursive
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
override: true
components: rust-src, llvm-tools-preview

- name: Run cargo install cargo-xbuild
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-xbuild
run: cargo install cargo-xbuild

- name: install NASM
uses: ilammy/setup-nasm@v1

- name: Install AFL (Linux)
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-afl
run: cargo install cargo-afl
if: runner.os == 'Linux'

- name: Install Cargo-Fuzz (Linux)
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-fuzz
run: cargo install cargo-fuzz
if: runner.os == 'Linux'

- name: Preparation work
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/integration-tdx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@ jobs:
run: bash sh_script/update_toolchain.sh ${{ env.RUST_TOOLCHAIN }}

- name: Run cargo install cargo-xbuild
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-xbuild
run: cargo install cargo-xbuild

- name: Preparation Work
run: bash sh_script/preparation.sh
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,13 @@ jobs:
submodules: recursive

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rust-src, llvm-tools-preview

- name: Run cargo install cargo-xbuild
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-xbuild
run: cargo install cargo-xbuild

# install QEMU
- name: Install QEMU (Linux)
Expand Down
16 changes: 4 additions & 12 deletions .github/workflows/library.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,18 +38,14 @@ jobs:
uses: ilammy/setup-nasm@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
override: true

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
override: true

- name: Checkout sources
uses: actions/checkout@v4
Expand Down Expand Up @@ -87,18 +83,14 @@ jobs:
uses: ilammy/setup-nasm@v1

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.STABLE_RUST_TOOLCHAIN }}
override: true

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.NIGHTLY_RUST_TOOLCHAIN }}
override: true

- name: Checkout sources
uses: actions/checkout@v4
Expand Down
19 changes: 4 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,13 @@ jobs:
submodules: recursive

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rust-src

- name: Run cargo install cargo-xbuild
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-xbuild
run: cargo install cargo-xbuild

- name: Preparation Work
run: bash sh_script/preparation.sh
Expand All @@ -66,16 +61,10 @@ jobs:
run: make test

- name: Build Release TdShim
uses: actions-rs/cargo@v1
with:
command: xbuild
args: -p td-shim --target x86_64-unknown-none --release --features=main,tdx
run: cargo xbuild -p td-shim --target x86_64-unknown-none --release --features=main,tdx

- name: Build Debug TdShim
uses: actions-rs/cargo@v1
with:
command: xbuild
args: -p td-shim --target x86_64-unknown-none --features=main,tdx --no-default-features
run: cargo xbuild -p td-shim --target x86_64-unknown-none --features=main,tdx --no-default-features

- name: Build td-shim-tools
run: |
Expand Down
9 changes: 2 additions & 7 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,13 @@ jobs:
submodules: recursive

- name: Install toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@master
with:
profile: ${{ env.TOOLCHAIN_PROFILE }}
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rust-src

- name: Run cargo install cargo-xbuild
uses: actions-rs/cargo@v1
with:
command: install
args: cargo-xbuild
run: cargo install cargo-xbuild

- name: Preparation Work
run: make preparation
Expand Down