46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
name: macos
|
|
|
|
on:
|
|
push:
|
|
release:
|
|
types: published
|
|
|
|
jobs:
|
|
dethrace-macos:
|
|
runs-on: macos-10.15
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: Set Git Info
|
|
id: gitinfo
|
|
run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
|
|
|
|
- name: Obtain tag version
|
|
id: get_version
|
|
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
brew install SDL2
|
|
|
|
- name: Configure Dethrace
|
|
run: |
|
|
cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo -DBUILD_TESTS=ON -B build
|
|
|
|
- name: Build Dethrace
|
|
run: |
|
|
cmake --build build -- -j 4
|
|
|
|
- name: Run unit tests
|
|
run: |
|
|
cd build
|
|
ctest --verbose
|
|
|
|
- name: Create artifact
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
run: |
|
|
tar -czvf ${{ github.workspace }}/dethrace-${{ steps.get_version.version}}-darwin-amd64.tar.gz ./build/dethrace
|