try macos-latest-xlarge #18
Workflow file for this run
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: Cross-Platform CLI Builder | |
on: | |
push: | |
tags: | |
- 'v*' | |
workflow_dispatch: | |
permissions: | |
contents: write | |
actions: read | |
jobs: | |
build: | |
name: Build ${{ matrix.target }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
include: | |
- target: x86_64-apple-darwin | |
os: macos-13-xlarge | |
rust_target: x86_64-apple-darwin | |
- target: aarch64-apple-darwin | |
os: macos-latest-xlarge | |
rust_target: aarch64-apple-darwin | |
- target: x86_64-unknown-linux-gnu | |
os: ubuntu-22.04 | |
rust_target: x86_64-unknown-linux-gnu | |
- target: aarch64-unknown-linux-gnu | |
os: ubuntu-22.04-arm | |
rust_target: aarch64-unknown-linux-gnu | |
steps: | |
- name: Checkout start-os | |
uses: actions/checkout@v4 | |
with: | |
repository: start9labs/start-os | |
ref: next/minor | |
path: start-os | |
submodules: recursive | |
- name: Setup Rust toolchain | |
uses: dtolnay/rust-toolchain@stable | |
with: | |
toolchain: stable | |
targets: ${{ matrix.rust_target }} | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build CLI | |
working-directory: ./start-os | |
env: | |
ARCH: ${{ matrix.rust_target }} | |
run: | | |
make cli | |
mkdir -p ../artifacts | |
cp ~/.cargo/bin/start-cli ../artifacts/start-cli-${{ matrix.target }} | |
- name: Create archive and generate SHA256 | |
working-directory: artifacts | |
run: | | |
tar -czf start-cli-${{ matrix.target }}.tar.gz start-cli-${{ matrix.target }} | |
shasum -a 256 start-cli-${{ matrix.target }}.tar.gz > start-cli-${{ matrix.target }}.tar.gz.sha256 | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: cli-binaries-${{ matrix.target }} | |
path: artifacts/ | |
release: | |
name: Create Release | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Download artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
pattern: cli-binaries-* | |
path: release-binaries | |
merge-multiple: true | |
- name: Verify artifacts and combine checksums | |
working-directory: release-binaries | |
run: | | |
echo "Downloaded binaries:" | |
ls -lh * | |
cat *.sha256 > sha256sums.txt | |
echo "SHA256 checksums:" | |
cat sha256sums.txt | |
- name: Generate release notes | |
working-directory: release-binaries | |
run: | | |
echo "## Start CLI ${{ github.ref_name }}" > release-notes.txt | |
echo "" >> release-notes.txt | |
echo "### SHA256 Checksums" >> release-notes.txt | |
echo '```' >> release-notes.txt | |
cat sha256sums.txt >> release-notes.txt | |
echo '```' >> release-notes.txt | |
- name: Create Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
release-binaries/start-cli-*.tar.gz | |
release-binaries/sha256sums.txt | |
name: Start CLI ${{ github.ref_name }} | |
body_path: release-binaries/release-notes.txt | |
generate_release_notes: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |