reorganise more ci stuff

This commit is contained in:
Caelan
2024-10-07 11:03:00 -06:00
parent 43fd2881e8
commit 6d0b5eaec5

View File

@@ -11,60 +11,6 @@ env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
jobs:
test-bins:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: windows-latest
rust_flags: "--target i686-pc-windows-msvc --features windows"
- os: ubuntu-latest
rust_flags: "--target x86_64-unknown-linux-gnu"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
with:
key: "rust-test-${{ matrix.os }}"
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test Rust
run: cargo llvm-cov ${{ matrix.rust_flags }} --cobertura --output-path ./test/coverage.rust.${{ matrix.os }}.xml
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
file: ./test/coverage.rust.${{ matrix.os }}.xml
test-libs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
with:
key: "lib-test-${{ matrix.os }}"
- name: Check lib-nodejs
working-directory: src/lib-nodejs
run: |
npm install
npm run build
- name: Check lib-rust
run: cargo check -p velopack -F async,delta
- name: Check RustIced Sample
working-directory: samples/RustIced
run: cargo check
- name: Build Rust Bins
run: cargo build
- name: Test lib-nodejs
working-directory: src/lib-nodejs
run: npm run test
build-rust-windows:
runs-on: windows-latest
env:
@@ -179,9 +125,9 @@ jobs:
- name: Create Universal Binary
run: |
lipo -create -output ./target/UpdateMac ./target/x86_64-apple-darwin/release/update ./target/aarch64-apple-darwin/release/update
file ./target/release/UpdateMac
file ./target/UpdateMac
lipo -create -output ./target/velopack_nodeffi_osx.node ./target/x86_64-apple-darwin/release/libvelopack_nodeffi.dylib ./target/aarch64-apple-darwin/release/libvelopack_nodeffi.dylib
file ./target/release/UpdateMac
file ./target/velopack_nodeffi_osx.node
- name: Upload Rust Build Artifacts
uses: actions/upload-artifact@v4
with:
@@ -193,6 +139,65 @@ jobs:
- name: Cancel workflow if failed
uses: andymckay/cancel-action@0.4
if: ${{ failure() }}
test-bins:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
include:
- os: windows-latest
rust_flags: "--target i686-pc-windows-msvc --features windows"
- os: ubuntu-latest
rust_flags: "--target x86_64-unknown-linux-gnu"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
with:
key: "rust-test-${{ matrix.os }}"
- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov
- name: Test Rust
run: cargo llvm-cov ${{ matrix.rust_flags }} --cobertura --output-path ./test/coverage.rust.${{ matrix.os }}.xml
- name: Upload Coverage
uses: codecov/codecov-action@v4
with:
file: ./test/coverage.rust.${{ matrix.os }}.xml
test-libs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
needs: [build-rust-macos, build-rust-windows, build-rust-linux]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Swatinem/rust-cache@v2
with:
key: "lib-test-${{ matrix.os }}"
- name: Check lib-nodejs
working-directory: src/lib-nodejs
run: |
npm install
npm run build
- name: Check lib-rust
run: cargo check -p velopack -F async,delta
- name: Check RustIced Sample
working-directory: samples/RustIced
run: cargo check
- name: Download Rust Artifacts
uses: actions/download-artifact@v4
with:
path: target/release
pattern: rust-*
merge-multiple: true
- name: Test lib-nodejs
working-directory: src/lib-nodejs
run: npm run test
test-vpk:
strategy: