Skip to content

packaging

packaging #10

Workflow file for this run

name: packaging
on:
# This workflow is manually triggered
workflow_dispatch:
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu, macos, windows ]
build_type: [ Debug, Release ]
arch: [ x86_64, arm64 ]
exclude:
- os: ubuntu
arch: arm64
- os: windows
arch: arm64
runs-on: ${{ matrix.os }}-latest
env:
CMAKE_CONFIG_PROJECT: -DPICROSS_BUILD_CLI=ON -DPICROSS_BUILD_APP=ON
CMAKE_CONFIG_EXTRA: ${{ matrix.os == 'macos' && format('-DCMAKE_OSX_ARCHITECTURES={0}', matrix.arch) || '' }}
steps:
- uses: actions/checkout@v4
- if: matrix.os == 'ubuntu'
name: Install Dependencies
run: |
sudo apt-get update
sudo apt-get install -y libwayland-dev libxkbcommon-dev xorg-dev libgl1-mesa-dev
- name: Configure CMake
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} ${{ env.CMAKE_CONFIG_PROJECT }} ${{ env.CMAKE_CONFIG_EXTRA }}
- name: Build
working-directory: ${{ github.workspace }}/build
run: cmake --build . --config ${{ matrix.build_type }}
- if: matrix.arch == 'x86_64'
name: Version
working-directory: ${{ github.workspace }}/build
run: cmake --build . --target picross_cli_version --config ${{ matrix.build_type }}
- name: Install
working-directory: ${{ github.workspace }}/build
run: cmake --install . --config ${{ matrix.build_type }} --prefix install
- name: Upload
uses: actions/upload-artifact@v4
with:
name: package-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build_type }}
path: ${{ github.workspace }}/build/install
retention-days: 6