mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
123 lines
3.4 KiB
YAML
123 lines
3.4 KiB
YAML
name: start-cli
|
|
|
|
on:
|
|
workflow_call:
|
|
workflow_dispatch:
|
|
inputs:
|
|
environment:
|
|
type: choice
|
|
description: Environment
|
|
options:
|
|
- NONE
|
|
- dev
|
|
- unstable
|
|
- dev-unstable
|
|
runner:
|
|
type: choice
|
|
description: Runner
|
|
options:
|
|
- standard
|
|
- fast
|
|
arch:
|
|
type: choice
|
|
description: Architecture
|
|
options:
|
|
- ALL
|
|
- x86_64
|
|
- x86_64-apple
|
|
- aarch64
|
|
- aarch64-apple
|
|
- riscv64
|
|
push:
|
|
branches:
|
|
- master
|
|
- next/*
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
- next/*
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.head.sha || github.sha }}
|
|
cancel-in-progress: true
|
|
|
|
env:
|
|
NODEJS_VERSION: "24.11.0"
|
|
ENVIRONMENT: '${{ fromJson(format(''["{0}", ""]'', github.event.inputs.environment || ''dev''))[github.event.inputs.environment == ''NONE''] }}'
|
|
|
|
jobs:
|
|
compile:
|
|
name: Build Debian Package
|
|
strategy:
|
|
fail-fast: true
|
|
matrix:
|
|
triple: >-
|
|
${{
|
|
fromJson('{
|
|
"x86_64": ["x86_64-unknown-linux-musl"],
|
|
"x86_64-apple": ["x86_64-apple-darwin"],
|
|
"aarch64": ["aarch64-unknown-linux-musl"],
|
|
"x86_64-apple": ["aarch64-apple-darwin"],
|
|
"riscv64": ["riscv64gc-unknown-linux-musl"],
|
|
"ALL": ["x86_64-unknown-linux-musl", "x86_64-apple-darwin", "aarch64-unknown-linux-musl", "aarch64-apple-darwin", "riscv64gc-unknown-linux-musl"]
|
|
}')[github.event.inputs.platform || 'ALL']
|
|
}}
|
|
runs-on: ${{ fromJson('["ubuntu-latest", "buildjet-32vcpu-ubuntu-2204"]')[github.event.inputs.runner == 'fast'] }}
|
|
steps:
|
|
- name: Cleaning up unnecessary files
|
|
run: |
|
|
sudo apt-get remove --purge -y mono-* \
|
|
ghc* cabal-install* \
|
|
dotnet* \
|
|
php* \
|
|
ruby* \
|
|
mysql-* \
|
|
postgresql-* \
|
|
azure-cli \
|
|
powershell \
|
|
google-cloud-sdk \
|
|
msodbcsql* mssql-tools* \
|
|
imagemagick* \
|
|
libgl1-mesa-dri \
|
|
google-chrome-stable \
|
|
firefox
|
|
sudo apt-get autoremove -y
|
|
sudo apt-get clean
|
|
|
|
- run: |
|
|
sudo mount -t tmpfs tmpfs .
|
|
if: ${{ github.event.inputs.runner == 'fast' }}
|
|
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
submodules: recursive
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: ${{ env.NODEJS_VERSION }}
|
|
|
|
- name: Set up docker QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Configure sccache
|
|
uses: actions/github-script@v7
|
|
with:
|
|
script: |
|
|
core.exportVariable('ACTIONS_RESULTS_URL', process.env.ACTIONS_RESULTS_URL || '');
|
|
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
|
|
|
|
- name: Make
|
|
run: TARGET=${{ matrix.triple }} make cli
|
|
env:
|
|
PLATFORM: ${{ matrix.arch }}
|
|
SCCACHE_GHA_ENABLED: on
|
|
SCCACHE_GHA_VERSION: 0
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: start-cli_${{ matrix.triple }}
|
|
path: core/target/${{ matrix.triple }}/release/start-cli
|