kestrel v1.0.2 #162
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build Release | |
on: | |
push: | |
branches: | |
- main | |
tags: | |
- v1.* | |
workflow_dispatch: | |
inputs: | |
git-ref: | |
description: "Git Ref" | |
required: false | |
jobs: | |
create-source-archive: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout (Latest) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref == '' | |
- name: Checkout (Ref) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref != '' | |
- name: Create Source Archive | |
run: make source | |
- name: Upload Source Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: source-archive | |
path: build/kestrel-*.*.*.tar.gz | |
release-linux: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Build Dependencies | |
run: | | |
rustup update | |
rustup target add x86_64-unknown-linux-musl | |
rustup target add aarch64-unknown-linux-musl | |
sudo apt-get update | |
sudo apt-get install -y gcc-aarch64-linux-gnu rpm | |
- name: Checkout (Latest) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref == '' | |
- name: Checkout (Ref) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref != '' | |
- name: Build Release | |
run: make all-linux | |
- name: Upload Release Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-linux | |
path: build/release-linux-*.tar.gz | |
release-macos: | |
runs-on: macos-latest | |
steps: | |
- name: Install Build Dependencies | |
run: | | |
rustup update | |
rustup target add x86_64-apple-darwin | |
rustup target add aarch64-apple-darwin | |
- name: Checkout (Latest) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref == '' | |
- name: Checkout (Ref) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref != '' | |
- name: Build Release | |
run: make all-macos | |
- name: Upload Release Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-macos | |
path: build/release-macos-*.tar.gz | |
release-windows: | |
runs-on: windows-latest | |
steps: | |
- name: Install Build Dependencies | |
run: | | |
rustup update | |
rustup target add x86_64-pc-windows-msvc | |
- name: Checkout (Latest) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref == '' | |
- name: Checkout (Ref) | |
uses: actions/checkout@v4 | |
if: github.event.inputs.git-ref != '' | |
- name: Build Release | |
run: | | |
.\windows-build.ps1 all | |
shell: pwsh | |
- name: Upload Release Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-windows | |
path: build/release-windows-*.zip | |
combine-artifacts: | |
runs-on: ubuntu-22.04 | |
needs: [ | |
create-source-archive, | |
release-linux, | |
release-macos, | |
release-windows | |
] | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
- name: Extract Files | |
run: | | |
tar -C release-linux -xf release-linux/release-linux-*.tar.gz | |
tar -C release-macos -xf release-macos/release-macos-*.tar.gz | |
unzip release-windows/release-windows-*.zip -d release-windows | |
- name: Create Combined Release | |
run: | | |
mkdir release-all | |
cp -a release-linux/release-linux-*/* release-all/ | |
cp -a release-macos/release-macos-*/* release-all/ | |
cp release-windows/release-windows-*/* release-all/ | |
cp -a source-archive/kestrel-*.*.*.tar.gz release-all/ | |
cd release-all && sha256sum -b * > SHA256SUMS.txt && cd .. | |
tar -czvpf release-all.tar.gz release-all | |
- name: Upload Release Archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: release-all | |
path: release-all.tar.gz |