mirror of https://github.com/synctv-org/synctv
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
1.9 KiB
YAML
77 lines
1.9 KiB
YAML
name: build
|
|
|
|
on:
|
|
push:
|
|
paths-ignore:
|
|
- '**.md'
|
|
pull_request:
|
|
paths-ignore:
|
|
- '**.md'
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }}
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
jobs:
|
|
get-targets:
|
|
name: Get all targets
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
targets: ${{ steps.get-targets.outputs.targets }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Get All Targets
|
|
id: get-targets
|
|
uses: zijiren233/go-build-action@main
|
|
with:
|
|
show-all-targets: true
|
|
build-config: script/build.config.sh
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
needs: get-targets
|
|
strategy:
|
|
matrix:
|
|
target: ${{ fromJson(needs.get-targets.outputs.targets) }}
|
|
steps:
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
tool-cache: false
|
|
android: true
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: false
|
|
docker-images: true
|
|
swap-storage: true
|
|
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.23"
|
|
|
|
- name: Build targets
|
|
uses: zijiren233/go-build-action@main
|
|
with:
|
|
targets: ${{ matrix.target }}
|
|
build-config: script/build.config.sh
|
|
enable-micro: true
|
|
more-go-cmd-args: "-a -v"
|
|
config-args: "--skip-init-web"
|
|
|
|
- name: Get artifact name
|
|
id: get_artifact_name
|
|
run: |
|
|
echo "ARTIFACT_NAME=$(echo ${{ matrix.target }} | tr '/' '-')" >> $GITHUB_OUTPUT
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ steps.get_artifact_name.outputs.ARTIFACT_NAME }}
|
|
path: build/*
|