Skip to content

Commit

Permalink
Replace deprecated actions-rs with dtolnay/rust-toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralith committed Jul 29, 2024
1 parent b4fd6c7 commit a3c57e6
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 54 deletions.
30 changes: 6 additions & 24 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,23 +20,13 @@ jobs:
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_VERSION }}/windows/VulkanSDK-${{ env.VULKAN_VERSION }}-Installer.exe" -OutFile vulkan.exe
./vulkan.exe --accept-licenses --default-answer --confirm-command install
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: dtolnay/rust-toolchain@stable

- name: Build Server
uses: actions-rs/cargo@v1
with:
command: build
args: --package server --release
run: cargo build --package server --release

- name: Build Client
uses: actions-rs/cargo@v1
with:
command: build
args: --package client --release --no-default-features
run: cargo build --package client --release --no-default-features

- name: Package Artifacts
run: |
Expand Down Expand Up @@ -72,21 +62,13 @@ jobs:
tar xf install.tgz
echo "SHADERC_LIB_DIR=$PWD/install/lib" >> "$GITHUB_ENV"
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: dtolnay/rust-toolchain@stable

- name: Build Server
uses: actions-rs/cargo@v1
with:
command: build
args: --package server --release
run: cargo build --package server --release

- name: Build Client
uses: actions-rs/cargo@v1
with:
command: build
args: --package client --release
run: cargo build --package client --release --no-default-features

- name: Strip
run: |
Expand Down
38 changes: 8 additions & 30 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,49 +31,27 @@ jobs:
./vulkan.exe --accept-licenses --default-answer --confirm-command install
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: build
args: --workspace --all-targets
- uses: actions-rs/cargo@v1
with:
command: test
args: --workspace
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --workspace --all-targets
- run: cargo test --workspace

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
- uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions-rs/cargo@v1
if: always()
with:
command: clippy
args: --workspace --all-targets -- -D warnings
- run: cargo fmt --all -- --check
- if: always()
run: cargo clippy --workspace --all-targets -- -D warnings

check-protos:
name: Check protos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
toolchain: stable
- uses: dtolnay/rust-toolchain@stable
- run: sudo apt update && sudo apt-get -y install protobuf-compiler
- name: Generate Rust code from .proto files
run: cargo run -p gen-protos
Expand Down

0 comments on commit a3c57e6

Please sign in to comment.