-
Notifications
You must be signed in to change notification settings - Fork 1
71 lines (65 loc) · 2.23 KB
/
saiblo.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: build for saiblo
on:
workflow_dispatch:
jobs:
create_release:
name: Create release
runs-on: ubuntu-16.04
# Note this. We are going to use that in further jobs.
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Add SHORT_SHA env property with commit short sha
run: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> $GITHUB_ENV
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.PAT }}
with:
release_name: ${{ env.SHORT_SHA }}-saiblo
tag_name: ${{ env.SHORT_SHA }}-saiblo
draft: false
prerelease: false
build:
name: Build artifacts
needs: create_release # we need to know the upload URL
runs-on: ubuntu-16.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get CMake
uses: lukka/[email protected]
- name: Get RandR Lib for Ubuntu
run: sudo apt-get update && sudo apt-get install xorg-dev libglu1-mesa-dev libxrandr-dev
- name: Install vcpkg on unix-like systems
working-directory: ./tools/vcpkg
timeout-minutes: 10
run: |
ls -al
./bootstrap-vcpkg.sh
./vcpkg integrate install
./vcpkg install box2d
- name: Build the executable
shell: pwsh
run: |
echo "applying patch..."
ls -al ./tools/vcpkg/installed
patch ./tools/vcpkg/installed/x64-linux/include/box2d/b2_math.h ./tools/b2_math.patch
echo "patch applied"
mkdir ./bin
cd ./bin
echo "build on *nix"
cmake .. -DCMAKE_BUILD_TYPE=Release -DLOCAL=OFF
cmake --build .
- name: Upload unix-like releases - Private
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ needs.create_release.outputs.upload_url }}
asset_name: eggs-saiblo
asset_path: ./bin/main
asset_content_type: application/octet-stream