-
-
Notifications
You must be signed in to change notification settings - Fork 3
195 lines (178 loc) · 7.39 KB
/
linux.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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
name: Linux
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-x86_64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Submodules
run: git submodule update --init --recursive
- name: Setup latest Alpine Linux
id: alpine-target
uses: jirutka/setup-alpine@v1
with:
packages: >
build-base
git
linux-headers
ninja
- name: Build in Alpine chroot
run: |
cd /home/runner/work/Kongruent/Kongruent
git clone --depth 1 https://github.com/Kode/KincTools_linux_x64.git KincTools
./KincTools/kmake --compile
shell: alpine.sh --root {0}
- name: Get KincTools_linux_x64
run: git clone https://github.com/Kode/KincTools_linux_x64.git
- name: Copy binary
run: cp /home/runner/work/Kongruent/Kongruent/build/Release/kongruent KincTools_linux_x64/kongruent
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "[email protected]"
- name: Commit binary
id: commit
continue-on-error: true
run: git -C KincTools_linux_x64 commit -a -m "Update kong binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KincTools_linux_x64 tag kong_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KincTools_linux_x64 push https://Kode-Robbot:[email protected]/Kode/KincTools_linux_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KincTools_linux_x64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KincTools_linux_x64 push https://Kode-Robbot:[email protected]/Kode/KincTools_linux_x64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
build-aarch64:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Submodules
run: git submodule update --init --recursive
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
packages: >
build-base
wget
linux-headers
git
ninja
- name: Build in Alpine chroot
run: |
cd /home/runner/work
mkdir aarch64
wget -qO - https://more.musl.cc/11.2.1/x86_64-linux-musl/aarch64-linux-musl-cross.tgz | gunzip | tar xfp - -C ./aarch64
export PATH=$PATH:/home/runner/work/aarch64/aarch64-linux-musl-cross/bin:/home/runner/work/aarch64/aarch64-linux-musl-cross/include:/home/runner/work/aarch64/aarch64-linux-musl-cross/lib
cd /home/runner/work/Kongruent/Kongruent
git clone --depth 1 https://github.com/Kode/KincTools_linux_x64.git KincTools
./KincTools/kmake --compile --cc aarch64-linux-musl-gcc --cxx aarch64-linux-musl-g++
shell: alpine.sh --root {0}
- name: Get KincTools_linux_arm64
run: git clone https://github.com/Kode/KincTools_linux_arm64.git
- name: Copy binary
run: cp /home/runner/work/Kongruent/Kongruent/build/Release/kongruent KincTools_linux_arm64/kongruent
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "[email protected]"
- name: Commit binary
id: commit
continue-on-error: true
run: |
git -C KincTools_linux_arm64 commit -a -m "Update kong_arm64 binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KincTools_linux_arm64 tag linux_arm64_kong_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KincTools_linux_arm64 push https://Kode-Robbot:[email protected]/Kode/KincTools_linux_arm64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KincTools_linux_arm64 pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KincTools_linux_arm64 push https://Kode-Robbot:[email protected]/Kode/KincTools_linux_arm64.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
build-armv7l:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get Submodules
run: git submodule update --init --recursive
- name: Setup latest Alpine Linux
uses: jirutka/setup-alpine@v1
with:
packages: >
build-base
wget
linux-headers
git
ninja
- name: Build in Alpine chroot
run: |
cd /home/runner/work
mkdir armv7l
wget -qO - https://musl.cc/armv7l-linux-musleabihf-cross.tgz | gunzip | tar xfp - -C ./armv7l
export PATH=$PATH:/home/runner/work/armv7l/armv7l-linux-musleabihf-cross/bin:/home/runner/work/armv7l/armv7l-linux-musleabihf-cross/include:/home/runner/work/armv7l/armv7l-linux-musleabihf-cross/lib
cd /home/runner/work/Kongruent/Kongruent
git clone --depth 1 https://github.com/Kode/KincTools_linux_x64.git KincTools
./KincTools/kmake --compile --cc armv7l-linux-musleabihf-gcc --cxx armv7l-linux-musleabihf-g++
shell: alpine.sh --root {0}
- name: Get KincTools_linux_arm
run: git clone https://github.com/Kode/KincTools_linux_arm.git
- name: Copy binary
run: cp /home/runner/work/Kongruent/Kongruent/build/Release/kongruent KincTools_linux_arm/kongruent
- name: Set name
run: git config --global user.name "Robbot"
- name: Set email
run: git config --global user.email "[email protected]"
- name: Commit binary
id: commit
continue-on-error: true
run: |
git -C KincTools_linux_arm commit -a -m "Update kong_arm binary to $GITHUB_SHA."
- name: Tag binary
if: steps.commit.outcome == 'success'
run: git -C KincTools_linux_arm tag linux_arm_kong_$GITHUB_SHA
- name: Push binary
id: push1
if: steps.commit.outcome == 'success'
continue-on-error: true
run: git -C KincTools_linux_arm push https://Kode-Robbot:[email protected]/Kode/KincTools_linux_arm.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}
- name: Pull
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
run: git -C KincTools_linux_arm pull --no-rebase
- name: Push binary again
if: steps.commit.outcome == 'success' && steps.push1.outcome != 'success'
continue-on-error: true
run: git -C KincTools_linux_arm push https://Kode-Robbot:[email protected]/Kode/KincTools_linux_arm.git main --tags
env:
ROBBOT_PASS: ${{ secrets.ROBBOT_PASS }}