From 71d29bd64e9a8ca8bde51c1e4ca90f82d99195fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Thu, 12 Jan 2023 23:44:48 +0100 Subject: [PATCH] ci: add aarch64 targets --- .github/workflows/publish.yml | 26 +++++++++--------- .github/workflows/rust.yml | 33 ----------------------- .github/workflows/tests.yml | 50 +++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 46 deletions(-) delete mode 100644 .github/workflows/rust.yml create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 74f914b..7f8e467 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -13,16 +13,16 @@ jobs: publish: runs-on: windows-latest steps: - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v3 - with: - submodules: true - - name: Publish crates - run: | - cd livekit-utils && cargo publish - cd ../webrtc-sys && cargo publish - cd ../livekit-webrtc && cargo publish - cd ../livekit && cp ../README.md README.md && cargo publish --allow-dirty + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + - uses: actions/checkout@v3 + with: + submodules: true + - name: Publish crates + run: | + cd livekit-utils && cargo publish + cd ../webrtc-sys && cargo publish + cd ../livekit-webrtc && cargo publish + cd ../livekit && cp ../README.md README.md && cargo publish --allow-dirty diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml deleted file mode 100644 index 87886b3..0000000 --- a/.github/workflows/rust.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Tests & Build - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -env: - CARGO_TERM_COLOR: always - -jobs: - build: - strategy: - matrix: - os: [macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - continue-on-error: true - steps: - - name: Install Protoc - uses: arduino/setup-protoc@v1 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - - uses: actions/checkout@v3 - with: - submodules: true - - uses: Swatinem/rust-cache@v2 - with: - cache-on-failure: true - - name: Build - run: cargo build --verbose - - name: Run tests - run: cargo test --verbose diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 0000000..bdbc3eb --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,50 @@ +name: Tests + +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + strategy: + matrix: + include: + - os: windows-latest + target: x86_64-pc-windows-msvc + - os: windows-latest + target: aarch64-pc-windows-msvc + - os: macos-latest + target: x86_64-apple-darwin + code-target: darwin-x64 + - os: macos-latest + target: aarch64-apple-darwin + + name: Run tests (${{ matrix.target }}) + runs-on: ${{ matrix.os }} + steps: + - name: Install Protoc + uses: arduino/setup-protoc@v1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Install Rust toolchain + run: | + rustup update --no-self-update stable + rustup target add ${{ matrix.target }} + + - uses: actions/checkout@v3 + with: + submodules: true + + - name: Build + run: cargo build --release --verbose --target ${{ matrix.target }} + + - name: Tests + run: cargo test --release --verbose --target ${{ matrix.target }} + +