mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
ci: move artifact clean and add rust cache
This commit is contained in:
26
.github/workflows/build.yml
vendored
26
.github/workflows/build.yml
vendored
@@ -21,6 +21,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "rust-test-${{ matrix.os }}"
|
||||
workspaces: "src/Rust -> target"
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- name: Install NBGV
|
||||
@@ -52,6 +56,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "rust-build-${{ matrix.os }}"
|
||||
workspaces: "src/Rust -> target"
|
||||
- name: Install NBGV
|
||||
run: dotnet tool install -g nbgv
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
@@ -73,7 +81,7 @@ jobs:
|
||||
working-directory: src/Rust/target/release
|
||||
run: cp update UpdateMac
|
||||
if: ${{ matrix.os == 'macos-latest' }}
|
||||
- name: Upload Rust Artifacts
|
||||
- name: Upload Rust Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: rust-${{ matrix.os }}
|
||||
@@ -96,7 +104,7 @@ jobs:
|
||||
fetch-depth: 0
|
||||
- name: Build .NET
|
||||
run: dotnet build -c Release
|
||||
- name: Upload Build Artifacts
|
||||
- name: Upload Dotnet Build Artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dotnet-${{ matrix.os }}
|
||||
@@ -128,10 +136,6 @@ jobs:
|
||||
with:
|
||||
name: dotnet-${{ matrix.os }}
|
||||
path: build
|
||||
- name: Delete Dotnet Artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: dotnet-${{ matrix.os }}
|
||||
- name: Test .NET Velopack.Tests
|
||||
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Velopack.Tests/Velopack.Tests.csproj
|
||||
- name: Test .NET Velopack.Packaging.Tests
|
||||
@@ -146,6 +150,16 @@ jobs:
|
||||
directory: ./test
|
||||
fail_ci_if_error: true
|
||||
|
||||
clean-artifacts:
|
||||
if: ${{ always() }}
|
||||
needs: [build-dotnet, test-dotnet]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Delete Dotnet Artifacts
|
||||
uses: geekyeggo/delete-artifact@v5
|
||||
with:
|
||||
name: dotnet-*
|
||||
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-rust-bins]
|
||||
|
||||
Reference in New Issue
Block a user