Skip to content

Clean up CI

Clean up CI #1026

Workflow file for this run

name: CI
on:
push:
branches: ['master']
pull_request:
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
env:
VULKAN_VERSION: "1.3.231.1"
steps:
- name: Install shaderc
if: matrix.os == 'ubuntu-latest'
run: |
wget -nv -r -nd -A install.tgz 'https://storage.googleapis.com/shaderc/badges/build_link_linux_clang_release.html'
tar xf install.tgz
export SHADERC_LIB_DIR="$PWD/install/lib"
- name: Install Vulkan SDK
if: matrix.os == 'windows-latest'
run: |
Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/${{ env.VULKAN_VERSION }}/windows/VulkanSDK-${{ env.VULKAN_VERSION }}-Installer.exe" -OutFile vulkan.exe
.\vulkan.exe /S
- uses: actions/checkout@v1
- 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
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions-rs/toolchain@v1
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
check-protos:
name: Check protos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: dtolnay/rust-toolchain@v1
with:
profile: minimal
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
- name: Check for uncommitted changes
run: git diff --exit-code