-
Notifications
You must be signed in to change notification settings - Fork 65
108 lines (89 loc) · 3.19 KB
/
build-binaries.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
name: Build binaries
on:
push:
branches: [ master, linux2 ]
paths-ignore:
- com.valve.openvr/Runtime/x64/**
- com.valve.openvr/Runtime/x86/**
jobs:
build-windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Pull latest
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: git pull
- name: Generate build files (windows x64)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: cmake -G "Visual Studio 16 2019" .
- name: Build binaries (windows x64)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: cmake --build . --target ALL_BUILD --config Release
- name: Add modified binaries (x64)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: |
git add -u
- name: Clean 64-bit build files
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: git clean -d -f -x
- name: Generate build files (windows x86)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: cmake -G "Visual Studio 16 2019" -A Win32 .
- name: Build binaries (windows x86)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: cmake --build . --target ALL_BUILD --config Release
- name: Add modified binaries (windows x86)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: |
git add -u
- name: Push modified binaries (windows)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git commit -m "Github Actions: New windows binaries" -a
$global:LASTEXITCODE = 0
- name: Push modified binaries
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}
build-linux:
needs: build-windows
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0
- name: Pull latest
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: git pull
- name: Generate build files (linux)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: cmake .
- name: Build binaries (linux)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: make
- name: Add modified binaries (x64)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: |
set +e
git add -u
set -e
- name: Commit modified binaries (linux)
working-directory: ${{runner.workspace}}/unity-xr-plugin
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
set +e
git commit -m "Github Actions: New linux binaries" -a
set -e
- name: Push modified binaries
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}