mirror of
https://github.com/velopack/velopack.git
synced 2025-10-25 15:19:22 +00:00
ci cleanup
This commit is contained in:
17
.github/actions/job-setup/action.yml
vendored
17
.github/actions/job-setup/action.yml
vendored
@@ -1,9 +1,21 @@
|
||||
name: "Setup Job Environment"
|
||||
description: "Installs dependencies like dotnet, rust, etc."
|
||||
|
||||
inputs:
|
||||
update-dotnet:
|
||||
description: 'Whether to run the setup-dotnet action'
|
||||
required: false
|
||||
default: 'false'
|
||||
rust-cache:
|
||||
description: 'Whether to run the rust-cache action'
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Setup dotnet
|
||||
if: inputs.update-dotnet == 'true'
|
||||
uses: actions/setup-dotnet@v4
|
||||
with:
|
||||
dotnet-version: |
|
||||
@@ -22,3 +34,8 @@ runs:
|
||||
- name: Update Project Version
|
||||
shell: pwsh
|
||||
run: ./.github/set-nbgv-version.ps1
|
||||
- name: Rust Cache
|
||||
if: inputs.rust-cache == 'true'
|
||||
uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "${{ github.workflow }}"
|
||||
|
||||
5
.github/workflows/build-packages.yml
vendored
5
.github/workflows/build-packages.yml
vendored
@@ -9,7 +9,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
update-dotnet: true
|
||||
- name: Download Rust Artifacts
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
|
||||
39
.github/workflows/build-python.yml
vendored
39
.github/workflows/build-python.yml
vendored
@@ -6,13 +6,14 @@ jobs:
|
||||
linux:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: ubuntu-22.04
|
||||
target: x86_64
|
||||
- runner: ubuntu-22.04
|
||||
target: x86
|
||||
- runner: ubuntu-22.04
|
||||
- runner: ubuntu-22.04-arm
|
||||
target: aarch64
|
||||
- runner: ubuntu-22.04
|
||||
target: armv7
|
||||
@@ -21,10 +22,16 @@ jobs:
|
||||
- runner: ubuntu-22.04
|
||||
target: ppc64le
|
||||
steps:
|
||||
- name: Install Dependencies
|
||||
if: ${{ matrix.platform.runner == 'ubuntu-22.04-arm' }}
|
||||
run: |
|
||||
sudo apt update
|
||||
sudo apt install -y g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
@@ -53,6 +60,7 @@ jobs:
|
||||
musllinux:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: ubuntu-22.04
|
||||
@@ -67,7 +75,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
@@ -96,33 +105,42 @@ jobs:
|
||||
windows:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: windows-latest
|
||||
target: x64
|
||||
rust_target: x86_64-pc-windows-msvc
|
||||
- runner: windows-latest
|
||||
target: x86
|
||||
rust_target: i686-pc-windows-msvc
|
||||
- runner: windows-11-arm
|
||||
target: arm64
|
||||
rust_target: aarch64-pc-windows-msvc
|
||||
steps:
|
||||
- uses: actions-rust-lang/setup-rust-toolchain@v1
|
||||
if: ${{ matrix.platform.runner == 'windows-11-arm' }}
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
python-version: 3.13t
|
||||
architecture: ${{ matrix.platform.target }}
|
||||
- name: Build wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
target: ${{ matrix.platform.target }}
|
||||
target: ${{ matrix.platform.rust_target }}
|
||||
args: --release --out dist
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Build free-threaded wheels
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
working-directory: src/lib-python
|
||||
target: ${{ matrix.platform.target }}
|
||||
target: ${{ matrix.platform.rust_target }}
|
||||
args: --release --out dist -i python3.13t
|
||||
sccache: ${{ !startsWith(github.ref, 'refs/tags/') }}
|
||||
- name: Upload wheels
|
||||
@@ -134,6 +152,7 @@ jobs:
|
||||
macos:
|
||||
runs-on: ${{ matrix.platform.runner }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
platform:
|
||||
- runner: macos-13
|
||||
@@ -144,7 +163,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.x
|
||||
@@ -174,7 +194,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Build sdist
|
||||
uses: PyO3/maturin-action@v1
|
||||
with:
|
||||
|
||||
15
.github/workflows/build-rust.yml
vendored
15
.github/workflows/build-rust.yml
vendored
@@ -11,10 +11,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
key: "rust-build-windows"
|
||||
rust-cache: true
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup target add aarch64-pc-windows-msvc --toolchain nightly-x86_64-pc-windows-msvc
|
||||
@@ -69,7 +69,8 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
@@ -131,10 +132,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
key: "rust-build-macos"
|
||||
rust-cache: true
|
||||
- name: Install Dependencies
|
||||
run: |
|
||||
rustup target add x86_64-apple-darwin
|
||||
|
||||
40
.github/workflows/build-tests.yml
vendored
40
.github/workflows/build-tests.yml
vendored
@@ -11,7 +11,7 @@ env:
|
||||
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
|
||||
|
||||
jobs:
|
||||
test-bins:
|
||||
rust:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
@@ -24,19 +24,12 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
key: "rust-test-${{ matrix.os }}"
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Install cargo-llvm-cov
|
||||
uses: taiki-e/install-action@cargo-llvm-cov
|
||||
- name: Check lib-rust
|
||||
run: cargo check -p velopack -F async
|
||||
- name: Check lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
npm run test
|
||||
- name: Test Rust
|
||||
run: cargo llvm-cov ${{ matrix.rust_flags }} --cobertura --output-path ./test/coverage.rust.${{ matrix.os }}.xml
|
||||
- name: Upload Coverage
|
||||
@@ -44,8 +37,28 @@ jobs:
|
||||
with:
|
||||
files: ./test/coverage.rust.${{ matrix.os }}.xml
|
||||
|
||||
test-vpk:
|
||||
nodejs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
- name: Check lib-nodejs
|
||||
working-directory: src/lib-nodejs
|
||||
run: |
|
||||
npm install
|
||||
npm run build
|
||||
npm run test
|
||||
|
||||
vpk:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [windows-latest, ubuntu-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
@@ -58,7 +71,10 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- uses: ./.github/actions/job-setup
|
||||
- name: Setup Job Environment
|
||||
uses: ./.github/actions/job-setup
|
||||
with:
|
||||
update-dotnet: true
|
||||
- name: Install FUSE
|
||||
run: |
|
||||
sudo add-apt-repository universe
|
||||
|
||||
Reference in New Issue
Block a user