Skip to content

Commit

Permalink
Inlined dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
GrantSparks committed Jul 18, 2024
1 parent e1dcdb3 commit 1ef5549
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 50 deletions.
69 changes: 61 additions & 8 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,31 @@ env:
NDI_SDK_DIR: C:\Program Files\NDI\NDI 6 SDK

jobs:
setup:
uses: ./.github/workflows/setup-environment.yml
with:
sdk_url: ${{ secrets.NDI_SDK_ZIP_URL }}

test:
name: Test
needs: setup
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable

- name: Install LLVM for bindgen (Windows)
run: choco install llvm

- name: Download NDI SDK Library Installer (Windows)
run: curl -L -o NDI_6_SDK.zip ${{ secrets.NDI_SDK_ZIP_URL }}

- name: Install NDI SDK Library (Windows)
run: Expand-Archive -Path '.\NDI_6_SDK.zip' -DestinationPath $env:NDI_SDK_DIR

- name: Set Environment Variables (Windows)
run: |
echo "%NDI_SDK_DIR%\Bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- uses: Swatinem/rust-cache@v2

- name: Run tests
Expand All @@ -35,7 +48,6 @@ jobs:

format:
name: Format
needs: setup
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -45,12 +57,25 @@ jobs:
with:
components: rustfmt

- name: Install LLVM for bindgen (Windows)
run: choco install llvm

- name: Download NDI SDK Library Installer (Windows)
run: curl -L -o NDI_6_SDK.zip ${{ secrets.NDI_SDK_ZIP_URL }}

- name: Install NDI SDK Library (Windows)
run: Expand-Archive -Path '.\NDI_6_SDK.zip' -DestinationPath $env:NDI_SDK_DIR

- name: Set Environment Variables (Windows)
run: |
echo "%NDI_SDK_DIR%\Bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Check formatting
run: cargo fmt --all -- --check

lint:
name: Lint
needs: setup
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -60,6 +85,20 @@ jobs:
with:
components: clippy

- name: Install LLVM for bindgen (Windows)
run: choco install llvm

- name: Download NDI SDK Library Installer (Windows)
run: curl -L -o NDI_6_SDK.zip ${{ secrets.NDI_SDK_ZIP_URL }}

- name: Install NDI SDK Library (Windows)
run: Expand-Archive -Path '.\NDI_6_SDK.zip' -DestinationPath $env:NDI_SDK_DIR

- name: Set Environment Variables (Windows)
run: |
echo "%NDI_SDK_DIR%\Bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- name: Run Clippy
run: cargo clippy -- -D warnings

Expand All @@ -74,6 +113,20 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install LLVM for bindgen (Windows)
run: choco install llvm

- name: Download NDI SDK Library Installer (Windows)
run: curl -L -o NDI_6_SDK.zip ${{ secrets.NDI_SDK_ZIP_URL }}

- name: Install NDI SDK Library (Windows)
run: Expand-Archive -Path '.\NDI_6_SDK.zip' -DestinationPath $env:NDI_SDK_DIR

- name: Set Environment Variables (Windows)
run: |
echo "%NDI_SDK_DIR%\Bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
shell: pwsh

- uses: Swatinem/rust-cache@v2

- name: Publish to crates.io
Expand Down
42 changes: 0 additions & 42 deletions .github/workflows/setup-environment.yml

This file was deleted.

0 comments on commit 1ef5549

Please sign in to comment.