-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
On MacOS, we package for archs x86_64 and arm64
- Loading branch information
1 parent
d126e4a
commit f1d75f4
Showing
2 changed files
with
54 additions
and
34 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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 ] | ||
include: | ||
- os: macos | ||
arch: arm64 | ||
|
||
runs-on: ${{ matrix.os }}-latest | ||
|
||
env: | ||
CMAKE_CONFIG_EXTRA: ${{ matrix.os == 'macos' && format('-DCMAKE_OSX_ARCHITECTURES={0}', matrix.arch) || '' }} | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- if: matrix.os == 'ubuntu' | ||
name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y xorg-dev libgl1-mesa-dev | ||
- name: Configure CMake | ||
run: cmake -B ${{ github.workspace }}/build -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DPICROSS_BUILD_CLI=ON -DPICROSS_BUILD_APP=ON ${{ 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@v3 | ||
with: | ||
name: package-${{ matrix.os }}-${{ matrix.arch }}-${{ matrix.build_type }} | ||
path: ${{ github.workspace }}/build/install | ||
retention-days: 6 |