mirror of
https://github.com/xemu-project/xemu.git
synced 2026-07-11 01:24:41 +02:00
a6fcdc3d79
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.3 to 7.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/df4cb1c069e1874edd31b4311f1884172cec0e10...9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 7.0.0 dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
79 lines
2.3 KiB
YAML
79 lines
2.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
ref:
|
|
description: Git ref (commit, branch, or tag) to build
|
|
required: true
|
|
type: string
|
|
outputs:
|
|
pkg_version:
|
|
description: Build version
|
|
value: ${{ jobs.source.outputs.pkg_version }}
|
|
|
|
jobs:
|
|
source:
|
|
name: Create source package
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
pkg_version: ${{ steps.version.outputs.pkg_version }}
|
|
steps:
|
|
- name: Clone tree
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ inputs.ref }}
|
|
- name: Install dependencies
|
|
run: sudo apt-get install meson
|
|
- name: Determine release version
|
|
id: version
|
|
run: |
|
|
if TAG=$(git describe --tags --match 'v*' 2>/dev/null); then
|
|
echo "pkg_version=${TAG#v}" >> $GITHUB_OUTPUT
|
|
else
|
|
SHORT_HASH=$(git rev-parse --short HEAD)
|
|
echo "pkg_version=0.0.0-0-unofficial-${SHORT_HASH}" >> $GITHUB_OUTPUT
|
|
fi
|
|
- name: Create source package
|
|
id: package
|
|
run: |
|
|
pkg_name="xemu-${{ steps.version.outputs.pkg_version }}"
|
|
tar_filename="${pkg_name}.tar"
|
|
tar_prefix="./${pkg_name}/"
|
|
./scripts/archive-source.sh ${tar_filename} ${tar_prefix}
|
|
|
|
echo -n ${{ github.sha }} > XEMU_COMMIT
|
|
echo -n ${{ steps.version.outputs.pkg_version }} > XEMU_VERSION
|
|
tar -r --file "${tar_filename}" --transform "s,^./,${tar_prefix}," ./XEMU_COMMIT ./XEMU_VERSION
|
|
|
|
zstd "${tar_filename}"
|
|
echo "pkg_filename=${tar_filename}.zst" >> $GITHUB_OUTPUT
|
|
- name: Upload source package artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v4
|
|
with:
|
|
name: src
|
|
path: ${{ steps.package.outputs.pkg_filename }}
|
|
compression-level: 0
|
|
|
|
linux:
|
|
name: Linux
|
|
needs: source
|
|
uses: ./.github/workflows/build-linux.yml
|
|
with:
|
|
pkg_version: ${{ needs.source.outputs.pkg_version }}
|
|
|
|
macos:
|
|
name: macOS
|
|
needs: source
|
|
uses: ./.github/workflows/build-macos.yml
|
|
with:
|
|
pkg_version: ${{ needs.source.outputs.pkg_version }}
|
|
|
|
windows:
|
|
name: Windows
|
|
needs: source
|
|
uses: ./.github/workflows/build-windows.yml
|
|
with:
|
|
pkg_version: ${{ needs.source.outputs.pkg_version }}
|