Skip to content

Commit

Permalink
Add rust CI integration
Browse files Browse the repository at this point in the history
  • Loading branch information
palana committed Jan 14, 2025
1 parent 96dc526 commit 66ded7a
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/build-project.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,16 @@ jobs:
restore-keys: |
${{ runner.os }}-ccache-${{ matrix.architecture }}-
- uses: actions-rust-lang/setup-rust-toolchain@v1
if: matrix.architecture == 'arm64'
with:
target: aarch64-apple-darwin

- uses: actions-rust-lang/setup-rust-toolchain@v1
if: matrix.architecture == 'x86_64'
with:
target: x86_64-apple-darwin

- name: Set Up Codesigning 🔑
uses: ./.github/actions/setup-macos-codesigning
if: fromJSON(needs.check-event.outputs.codesign)
Expand Down Expand Up @@ -197,6 +207,8 @@ jobs:
echo "pluginName=${product_name}" >> $GITHUB_OUTPUT
echo "pluginVersion=${product_version}" >> $GITHUB_OUTPUT
- uses: actions-rust-lang/setup-rust-toolchain@v1

- uses: actions/cache@v4
id: ccache-cache
with:
Expand Down Expand Up @@ -271,6 +283,8 @@ jobs:
"pluginName=${ProductName}" >> $env:GITHUB_OUTPUT
"pluginVersion=${ProductVersion}" >> $env:GITHUB_OUTPUT
- uses: actions-rust-lang/setup-rust-toolchain@v1

- name: Build Plugin 🧱
uses: ./.github/actions/build-plugin
with:
Expand Down
14 changes: 14 additions & 0 deletions .github/workflows/check-format.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,17 @@ jobs:
uses: ./.github/actions/run-cmake-format
with:
failCondition: error

cargo-fmt:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions-rust-lang/setup-rust-toolchain@v1
with:
components: rustfmt
- name: rustfmt
uses: actions-rust-lang/rustfmt@v1
with:
manifest-path: deps/c-webvtt-in-video-stream/Cargo.toml
8 changes: 8 additions & 0 deletions cmake/BuildWebVTT.cmake
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
include(FetchContent)

set(Rust_RUSTUP_INSTALL_MISSING_TARGET true)

if(OS_MACOS)
if("$ENV{MACOS_ARCH}" STREQUAL "x86_64")
set(Rust_CARGO_TARGET "x86_64-apple-darwin")
endif()
endif()

FetchContent_Declare(
Corrosion
GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git
Expand Down

0 comments on commit 66ded7a

Please sign in to comment.