43 lines
1.4 KiB
YAML
43 lines
1.4 KiB
YAML
name: main-release-gate
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
verify-and-release:
|
|
runs-on: alkane-ci
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Formatting
|
|
run: cargo fmt --check
|
|
- name: Quality
|
|
run: cargo clippy --all-targets --locked -- -D warnings
|
|
- name: Build
|
|
run: cargo build --release --locked
|
|
- name: Unit and workflow tests
|
|
run: cargo test --locked
|
|
- name: Microbenchmarks
|
|
run: |
|
|
set -o pipefail
|
|
cargo test --release --locked -- --ignored --nocapture | tee bench-current.txt
|
|
- name: Pairing and simulator conformance
|
|
run: python3 ci/check-conformance.py
|
|
- name: Select release version
|
|
id: version
|
|
run: python3 ci/version.py main >> "$GITHUB_OUTPUT"
|
|
- name: Package source and benchmark result
|
|
if: steps.version.outputs.release == 'true'
|
|
run: |
|
|
mkdir -p dist
|
|
git archive --format=tar.gz --output="dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" HEAD
|
|
cp bench-current.txt dist/
|
|
- name: Create private release
|
|
if: steps.version.outputs.release == 'true'
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: python3 ci/release.py "${{ steps.version.outputs.tag }}" false "dist/alkane-os-${{ steps.version.outputs.version }}-source.tar.gz" dist/bench-current.txt
|
|
|