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
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
key: "rust-test-${{ matrix.os }}"
|
||||||
|
workspaces: "src/Rust -> target"
|
||||||
- name: Install cargo-llvm-cov
|
- name: Install cargo-llvm-cov
|
||||||
uses: taiki-e/install-action@cargo-llvm-cov
|
uses: taiki-e/install-action@cargo-llvm-cov
|
||||||
- name: Install NBGV
|
- name: Install NBGV
|
||||||
@@ -52,6 +56,10 @@ jobs:
|
|||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
with:
|
||||||
|
key: "rust-build-${{ matrix.os }}"
|
||||||
|
workspaces: "src/Rust -> target"
|
||||||
- name: Install NBGV
|
- name: Install NBGV
|
||||||
run: dotnet tool install -g nbgv
|
run: dotnet tool install -g nbgv
|
||||||
if: ${{ matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-latest' }}
|
||||||
@@ -73,7 +81,7 @@ jobs:
|
|||||||
working-directory: src/Rust/target/release
|
working-directory: src/Rust/target/release
|
||||||
run: cp update UpdateMac
|
run: cp update UpdateMac
|
||||||
if: ${{ matrix.os == 'macos-latest' }}
|
if: ${{ matrix.os == 'macos-latest' }}
|
||||||
- name: Upload Rust Artifacts
|
- name: Upload Rust Build Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: rust-${{ matrix.os }}
|
name: rust-${{ matrix.os }}
|
||||||
@@ -96,7 +104,7 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Build .NET
|
- name: Build .NET
|
||||||
run: dotnet build -c Release
|
run: dotnet build -c Release
|
||||||
- name: Upload Build Artifacts
|
- name: Upload Dotnet Build Artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: dotnet-${{ matrix.os }}
|
name: dotnet-${{ matrix.os }}
|
||||||
@@ -128,10 +136,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
name: dotnet-${{ matrix.os }}
|
name: dotnet-${{ matrix.os }}
|
||||||
path: build
|
path: build
|
||||||
- name: Delete Dotnet Artifacts
|
|
||||||
uses: geekyeggo/delete-artifact@v5
|
|
||||||
with:
|
|
||||||
name: dotnet-${{ matrix.os }}
|
|
||||||
- name: Test .NET Velopack.Tests
|
- name: Test .NET Velopack.Tests
|
||||||
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Velopack.Tests/Velopack.Tests.csproj
|
run: dotnet test --no-build -c Release -l "console;verbosity=detailed" test/Velopack.Tests/Velopack.Tests.csproj
|
||||||
- name: Test .NET Velopack.Packaging.Tests
|
- name: Test .NET Velopack.Packaging.Tests
|
||||||
@@ -145,6 +149,16 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
directory: ./test
|
directory: ./test
|
||||||
fail_ci_if_error: true
|
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:
|
package:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|||||||
Reference in New Issue
Block a user