move to libdmdutil #15
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: ppuc | |
on: | |
push: | |
pull_request: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
version: | |
name: Detect version | |
runs-on: ubuntu-latest | |
outputs: | |
tag: ${{ steps.version.outputs.tag }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: version | |
run: | | |
VERSION_MAJOR=$(grep -Eo "PPUC_EXECUTABLE_VERSION_MAJOR\s+[0-9]+" src/ppuc_version.h | grep -Eo "[0-9]+") | |
VERSION_MINOR=$(grep -Eo "PPUC_EXECUTABLE_VERSION_MINOR\s+[0-9]+" src/ppuc_version.h | grep -Eo "[0-9]+") | |
VERSION_PATCH=$(grep -Eo "PPUC_EXECUTABLE_VERSION_PATCH\s+[0-9]+" src/ppuc_version.h | grep -Eo "[0-9]+") | |
TAG="${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}" | |
echo "${TAG}" | |
echo "tag=${TAG}" >> $GITHUB_OUTPUT | |
build: | |
name: Build ppuc-${{ matrix.platform }}-${{ matrix.arch }} | |
runs-on: ${{ matrix.os }} | |
needs: [ version ] | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: windows-latest | |
platform: win | |
arch: x64 | |
- os: windows-latest | |
platform: win | |
arch: x86 | |
- os: macos-latest | |
platform: macos | |
arch: arm64 | |
- os: macos-latest | |
platform: macos | |
arch: x64 | |
- os: ubuntu-latest | |
platform: linux | |
arch: x64 | |
- os: ubuntu-latest | |
platform: linux | |
arch: aarch64 | |
steps: | |
- uses: actions/checkout@v4 | |
- if: (matrix.platform == 'linux' && matrix.arch == 'x64') | |
name: Install autoconf libtool libudev-dev libpipewire-0.3-dev | |
run: sudo apt install autoconf libtool libudev-dev libpipewire-0.3-dev | |
- if: (matrix.platform == 'win') | |
name: Add msbuild to path (win runner) | |
uses: microsoft/setup-msbuild@v1.1 | |
- if: (matrix.platform == 'macos') | |
name: Add autoconf and automake (mac runner) | |
run: | | |
brew install autoconf automake gcc-aarch64-embedded aarch64-elf-gcc | |
- if: (!(matrix.platform == 'linux' && matrix.arch == 'aarch64')) | |
name: Build ppuc-${{ matrix.platform }}-${{ matrix.arch }} | |
run: | | |
./platforms/${{ matrix.platform }}/${{ matrix.arch }}/build.sh | |
- if: (matrix.platform == 'linux' && matrix.arch == 'aarch64') | |
name: Build ppuc-${{ matrix.platform }}-${{ matrix.arch }} (arm runner) | |
uses: pguyot/arm-runner-action@v2 | |
with: | |
base_image: raspios_lite_arm64:latest | |
image_additional_mb: 4096 | |
cpu: cortex-a53 | |
cpu_info: cpuinfo/raspberrypi_zero2_w_arm64 | |
bind_mount_repository: true | |
commands: | | |
apt update -y --allow-releaseinfo-change | |
apt install --no-install-recommends -y pkg-config cmake autoconf automake libtool libudev-dev zlib1g-dev | |
./platforms/${{ matrix.platform }}/${{ matrix.arch }}/build.sh | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ppuc-${{ needs.version.outputs.tag }}-${{ matrix.platform }}-${{ matrix.arch }} | |
path: ppuc |