docs: Update license #1132
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
# Copyright (c) Omar Boukli-Hacene. All rights reserved. | |
# Distributed under an MIT-style license that can be | |
# found in the LICENSE file. | |
# SPDX-License-Identifier: MIT | |
name: Xcode build on macOS | |
on: | |
pull_request: | |
branches: | |
- main | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
permissions: {} | |
jobs: | |
build: | |
name: Build | |
runs-on: macos-latest | |
env: | |
BUILD_PATH: ${{ github.workspace }}/xcode/build | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: Check out vcpkg | |
uses: actions/checkout@v3 | |
with: | |
repository: microsoft/vcpkg | |
path: ${{ github.workspace }}/vcpkg | |
persist-credentials: false | |
- name: Apply vcpkg cache | |
id: vcpkg-cache | |
uses: actions/cache@v3 | |
with: | |
path: |- | |
$HOME/.cache/vcpkg/archives | |
${{ github.workspace }}/vcpkg | |
key: >- | |
${{ runner.os }}-vcpkg-archives-cache-${{ hashFiles( | |
'ci/cache-key-salt/macos.txt', | |
'vcpkg/ports/boost-test/vcpkg.json', | |
'vcpkg/ports/sdl2/vcpkg.json' | |
) }} | |
- name: Bootstrap vcpkg | |
run: ./vcpkg/bootstrap-vcpkg.sh -disableMetrics | |
- name: Install boost-test | |
run: ./vcpkg/vcpkg install boost-test | |
- name: Install pkg-config | |
run: brew install pkg-config | |
- name: Install SDL2 | |
run: |- | |
./vcpkg/vcpkg install --triplet x64-osx-dynamic sdl2 | |
./vcpkg/vcpkg install --triplet arm64-osx-dynamic sdl2 | |
- name: Make build script executable | |
run: chmod +x xcode/Tromino2d/scripts/uni.sh | |
- name: Build trominocli | |
run: >- | |
xcodebuild | |
-workspace TrominoPuzzle.xcworkspace | |
-scheme TrominoCli | |
-configuration Release | |
-destination 'platform=macOS,arch=x86_64' | |
CONFIGURATION_BUILD_DIR=${{ env.BUILD_PATH }} | |
build | |
working-directory: xcode | |
- name: Build tromino2d | |
run: >- | |
xcodebuild | |
-workspace TrominoPuzzle.xcworkspace | |
-scheme Tromino2d | |
-configuration Release | |
-destination 'platform=macOS,arch=x86_64' | |
CONFIGURATION_BUILD_DIR=${{ env.BUILD_PATH }} | |
build | |
working-directory: xcode | |
- name: Build unit tests | |
run: >- | |
xcodebuild | |
-workspace TrominoPuzzle.xcworkspace | |
-scheme UnitTests | |
-configuration Debug | |
-destination 'platform=macOS,arch=x86_64' | |
CONFIGURATION_BUILD_DIR=${{ env.BUILD_PATH }} | |
build | |
working-directory: xcode | |
- name: Run unit tests | |
run: ./UnitTests | |
working-directory: ${{ env.BUILD_PATH }} | |
- name: Compute SHA512 of artifacts | |
run: |- | |
ls -Al | grep -v '^d' | |
shasum --algorithm 512 --binary UnitTests | |
shasum --algorithm 512 --binary libSDL2-2.0.0.dylib | |
shasum --algorithm 512 --binary libtromino-validation.a | |
shasum --algorithm 512 --binary libtromino.a | |
shasum --algorithm 512 --binary libtromino2d.a | |
shasum --algorithm 512 --binary tromino | |
shasum --algorithm 512 --binary tromino2d | |
working-directory: ${{ env.BUILD_PATH }} |