Skip to content

Upgrade cargo and node dependencies #1450

Upgrade cargo and node dependencies

Upgrade cargo and node dependencies #1450

Workflow file for this run

name: Choreo / Build
on: [pull_request, push]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
cancel-in-progress: true
jobs:
build:
env:
MACOSX_DEPLOYMENT_TARGET: 13.3
strategy:
fail-fast: false
matrix:
include:
- artifact-name: Windows-x86_64
os: windows-2022
tauri-build-flags: --target x86_64-pc-windows-msvc -v -- --workspace
- artifact-name: Windows-aarch64
os: windows-2022
tauri-build-flags: --target aarch64-pc-windows-msvc -v -- --workspace
- artifact-name: macOS-x86_64
os: macOS-14
tauri-build-flags: --target x86_64-apple-darwin -v -- --workspace
- artifact-name: macOS-aarch64
os: macOS-14
tauri-build-flags: --target aarch64-apple-darwin -v -- --workspace
- artifact-name: Linux-x86_64
os: ubuntu-22.04
tauri-build-flags: --target x86_64-unknown-linux-gnu -v -- --workspace
name: "${{ matrix.artifact-name }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
with:
version: 9
- name: Install Linux dependencies
if: startsWith(matrix.os, 'ubuntu')
run: |
sudo apt-get update -q
sudo apt-get install -y \
build-essential \
curl \
file \
libayatana-appindicator3-dev \
libgtk-3-dev \
librsvg2-dev \
libssl-dev \
libwebkit2gtk-4.0-dev \
wget
- name: Install Node.js dependencies
run: pnpm install
continue-on-error: true
- name: Set up Windows aarch64 Rust compiler
if: matrix.artifact-name == 'Windows-aarch64'
run: rustup target install aarch64-pc-windows-msvc
- name: Set up macOS x86_64 Rust compiler
if: matrix.artifact-name == 'macOS-x86_64'
run: rustup target add x86_64-apple-darwin
- run: sudo xcode-select -switch /Applications/Xcode_15.3.app
if: startsWith(matrix.os, 'macOS')
- name: Set up sccache
uses: mozilla-actions/[email protected]
- name: Build package
run: pnpm run tauri build ${{ matrix.tauri-build-flags }}
env:
RUSTC_WRAPPER: sccache
SCCACHE_GHA_ENABLED: true
- name: Package artifacts (Windows x86_64)
if: matrix.artifact-name == 'Windows-x86_64'
run: |
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}-standalone.zip -Path target/x86_64-pc-windows-msvc/release/choreo.exe,target/x86_64-pc-windows-msvc/release/choreo-cli.exe
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}.zip -Path ${{ matrix.artifact-name }}-standalone.zip,target/x86_64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Package artifacts (Windows aarch64)
if: matrix.artifact-name == 'Windows-aarch64'
run: |
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}-standalone.zip -Path target/aarch64-pc-windows-msvc/release/choreo.exe,target/aarch64-pc-windows-msvc/release/choreo-cli.exe
Compress-Archive -DestinationPath ${{ matrix.artifact-name }}.zip -Path ${{ matrix.artifact-name }}-standalone.zip,target/aarch64-pc-windows-msvc/release/bundle/nsis/*.exe
- name: Package artifacts (macOS x86_64)
if: matrix.artifact-name == 'macOS-x86_64'
# Tauri incorrectly capitalizes the executable name on macOS, so we
# manually rename it
run: |
cp target/x86_64-apple-darwin/release/Choreo choreo
zip -j ${{ matrix.artifact-name }}-standalone.zip choreo target/x86_64-apple-darwin/release/choreo-cli
zip -j ${{ matrix.artifact-name }}.zip ${{ matrix.artifact-name }}-standalone.zip target/x86_64-apple-darwin/release/bundle/dmg/*.dmg
- name: Package artifacts (macOS aarch64)
if: matrix.artifact-name == 'macOS-aarch64'
# Tauri incorrectly capitalizes the executable name on macOS, so we
# manually rename it
run: |
cp target/aarch64-apple-darwin/release/Choreo choreo
zip -j ${{ matrix.artifact-name }}-standalone.zip choreo target/aarch64-apple-darwin/release/choreo-cli
zip -j ${{ matrix.artifact-name }}.zip ${{ matrix.artifact-name }}-standalone.zip target/aarch64-apple-darwin/release/bundle/dmg/*.dmg
- name: Package artifacts (Linux x86_64)
if: matrix.artifact-name == 'Linux-x86_64'
run: |
zip -j ${{ matrix.artifact-name }}-standalone.zip target/x86_64-unknown-linux-gnu/release/choreo target/x86_64-unknown-linux-gnu/release/choreo-cli
zip -j ${{ matrix.artifact-name }}.zip ${{ matrix.artifact-name }}-standalone.zip target/x86_64-unknown-linux-gnu/release/bundle/appimage/*.AppImage target/x86_64-unknown-linux-gnu/release/bundle/deb/*.deb target/x86_64-unknown-linux-gnu/release/bundle/rpm/*.rpm
# Zipping manually works around upload-artifact stripping execute
# permissions from files
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact-name }}
path: ${{ matrix.artifact-name }}.zip
release:
name: Create draft release
needs: [build]
runs-on: ubuntu-24.04
if: |
github.repository_owner == 'SleipnirGroup' &&
startsWith(github.ref, 'refs/tags/v')
steps:
- name: Download prebuilt binaries
uses: actions/download-artifact@v4
with:
path: pkg
- name: Display structure of downloaded files
run: ls -R
- name: Rename Windows x86_64 artifacts
working-directory: pkg/Windows-x86_64
run: |
unzip -o Windows-x86_64.zip
rm Windows-x86_64.zip
mv Windows-x86_64-standalone.zip Choreo-${{ github.ref_name }}-Windows-x86_64-standalone.zip
mv Choreo_*_x64-setup.exe Choreo-${{ github.ref_name }}-Windows-x86_64-setup.exe
- name: Rename Windows aarch64 artifacts
working-directory: pkg/Windows-aarch64
run: |
unzip -o Windows-aarch64.zip
rm Windows-aarch64.zip
mv Windows-aarch64-standalone.zip Choreo-${{ github.ref_name }}-Windows-aarch64-standalone.zip
mv Choreo_*_arm64-setup.exe Choreo-${{ github.ref_name }}-Windows-aarch64-setup.exe
- name: Rename macOS x86_64 artifacts
working-directory: pkg/macOS-x86_64
run: |
unzip -o macOS-x86_64.zip
rm macOS-x86_64.zip
mv macOS-x86_64-standalone.zip Choreo-${{ github.ref_name }}-macOS-x86_64-standalone.zip
mv Choreo_*_x64.dmg Choreo-${{ github.ref_name }}-macOS-x86_64.dmg
- name: Rename macOS aarch64 artifacts
working-directory: pkg/macOS-aarch64
run: |
unzip -o macOS-aarch64.zip
rm macOS-aarch64.zip
mv macOS-aarch64-standalone.zip Choreo-${{ github.ref_name }}-macOS-aarch64-standalone.zip
mv Choreo_*_aarch64.dmg Choreo-${{ github.ref_name }}-macOS-aarch64.dmg
- name: Rename Linux x86_64 artifacts
working-directory: pkg/Linux-x86_64
run: |
unzip -o Linux-x86_64.zip
rm Linux-x86_64.zip
mv Linux-x86_64-standalone.zip Choreo-${{ github.ref_name }}-Linux-x86_64-standalone.zip
mv choreo_*_amd64.AppImage Choreo-${{ github.ref_name }}-Linux-x86_64.AppImage
mv choreo_*_amd64.deb Choreo-${{ github.ref_name }}-Linux-x86_64.deb
mv choreo-*.x86_64.rpm Choreo-${{ github.ref_name }}-Linux-x86_64.rpm
- name: Display structure of renamed files
run: ls -R
- uses: ncipollo/release-action@v1
with:
name: Choreo ${{ github.ref_name }}
tag: ${{ github.ref_name }}
artifacts: "pkg/**/*"
draft: true
prerelease: true