forked from mirrors/kingfisher
preparing for v1.12
This commit is contained in:
commit
fc4aee9e41
249 changed files with 121395 additions and 0 deletions
42
.github/workflows/ci.yml
vendored
Normal file
42
.github/workflows/ci.yml
vendored
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
name: CI Pull Request
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
# This workflow runs on pull requests to the main branch
|
||||
# It builds the project for 2 platforms, Linux arm64 and macOS arm64,
|
||||
# and runs tests for each platform. All platforms tested on merge to main
|
||||
jobs:
|
||||
linux-arm64:
|
||||
name: Linux arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
- uses: swatinem/rust-cache@v2
|
||||
- name: Build (Makefile linux-arm64)
|
||||
run: make ubuntu-arm64
|
||||
- name: Run tests
|
||||
run: make tests
|
||||
|
||||
macos-arm64:
|
||||
name: macOS arm64
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
- uses: swatinem/rust-cache@v2
|
||||
- name: Build (Makefile darwin-arm64)
|
||||
run: make darwin-arm64
|
||||
- name: Run tests
|
||||
run: make tests
|
||||
199
.github/workflows/release.yml
vendored
Normal file
199
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,199 @@
|
|||
name: build-and-release
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
# ──────────────── Linux (via Makefile) ────────────────
|
||||
linux-x64:
|
||||
name: Linux x64
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- uses: swatinem/rust-cache@v2
|
||||
|
||||
- name: Build (Makefile linux-x64)
|
||||
run: make linux-x64
|
||||
|
||||
- name: Move artifact to dist
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/kingfisher-linux-x64.tgz dist/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: kingfisher-linux-x64
|
||||
path: dist/kingfisher-*linux-x64*.*
|
||||
|
||||
linux-arm64:
|
||||
name: Linux arm64
|
||||
runs-on: ubuntu-24.04-arm
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- uses: swatinem/rust-cache@v2
|
||||
|
||||
- name: Build (Makefile linux-arm64)
|
||||
run: make linux-arm64
|
||||
|
||||
- name: Move artifact to dist
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/kingfisher-linux-arm64.tgz dist/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: kingfisher-linux-arm64
|
||||
path: dist/kingfisher-*linux-arm64*.*
|
||||
|
||||
|
||||
macos-x64:
|
||||
name: macOS x64
|
||||
runs-on: macos-13
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- uses: swatinem/rust-cache@v2
|
||||
|
||||
- name: Build Darwin x64
|
||||
run: make darwin-x64
|
||||
|
||||
- name: Move artifacts to dist
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/kingfisher-darwin-x64.tgz dist/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: kingfisher-darwin-x64.tgz
|
||||
path: dist/kingfisher-darwin-x64.tgz
|
||||
|
||||
|
||||
macos-arm64:
|
||||
name: macOS arm64
|
||||
runs-on: macos-14
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- uses: swatinem/rust-cache@v2
|
||||
|
||||
- name: Build Darwin arm64
|
||||
run: make darwin-arm64
|
||||
|
||||
- name: Move artifacts to dist
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/kingfisher-darwin-arm64.tgz dist/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: kingfisher-darwin-arm64.tgz
|
||||
path: dist/kingfisher-darwin-arm64.tgz
|
||||
|
||||
|
||||
# ──────────────── Windows ────────────────
|
||||
windows:
|
||||
name: Windows x64
|
||||
runs-on: windows-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions-rs/toolchain@v1
|
||||
with:
|
||||
toolchain: 1.85.0
|
||||
profile: minimal
|
||||
override: true
|
||||
|
||||
- name: Cache vcpkg artifacts
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
# Adjust these paths if your vcpkg root is somewhere else
|
||||
path: |
|
||||
C:\vcpkg\buildtrees
|
||||
C:\vcpkg\packages
|
||||
C:\vcpkg\installed
|
||||
key: ${{ runner.os }}-vcpkg-${{ hashFiles('vcpkg.json', 'vcpkg-configuration.cmake') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-vcpkg-
|
||||
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
- name: Build
|
||||
run: .\buildwin.bat -force
|
||||
shell: cmd
|
||||
|
||||
- name: Run tests
|
||||
shell: pwsh
|
||||
run: |
|
||||
if (-not (Get-Command cargo-nextest -ErrorAction SilentlyContinue)) {
|
||||
cargo install --locked cargo-nextest
|
||||
}
|
||||
Write-Host "▶ cargo nextest run --release --workspace --all-targets"
|
||||
cargo nextest run --release --workspace --all-targets
|
||||
|
||||
- name: Move artifact to dist
|
||||
shell: bash
|
||||
run: |
|
||||
mkdir -p dist
|
||||
cp target/release/kingfisher-windows-x64.zip dist/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: kingfisher-windows-x64
|
||||
path: dist/kingfisher-*windows-x64*.*
|
||||
|
||||
# ──────────────── Draft public release ────────────────
|
||||
release:
|
||||
name: Public GitHub Release
|
||||
needs: [linux-x64, linux-arm64, windows, macos-x64, macos-arm64] # wait for all builds to finish
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # allow release upload
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Read version from Cargo.toml
|
||||
id: version
|
||||
run: |
|
||||
VERSION=$(grep -m1 '^version\s*=' Cargo.toml | cut -d '"' -f2)
|
||||
echo "version=$VERSION" >> "$GITHUB_OUTPUT"
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: target/release/kingfisher-*
|
||||
merge-multiple: true
|
||||
- name: Create release & upload assets
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: v${{ steps.version.outputs.version }}
|
||||
name: "Kingfisher v${{ steps.version.outputs.version }}"
|
||||
bodyFile: CHANGELOG.md # use existing changelog
|
||||
generateReleaseNotes: false # turn off auto-notes
|
||||
artifacts: target/release/**
|
||||
Loading…
Add table
Add a link
Reference in a new issue