-
Notifications
You must be signed in to change notification settings - Fork 26
183 lines (160 loc) · 5.68 KB
/
build-and-publish.yaml
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
name: Build and publish nightly
on:
push:
branches:
- 'master'
paths-ignore:
- 'README*.md'
jobs:
linux:
name: "Linux build"
runs-on: ubuntu-latest
env:
PREFIX: "/usr"
PY3PATH: ""
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo add-apt-repository -y ppa:dciabrin/ngdevkit
sudo apt-get update -y
sudo apt-get install -y ngdevkit-toolchain python3 zip pkg-config
- name: Build ngdevkit
run: ./.github/scripts/build.sh
- name: Install dependencies for ngdevkit-examples
run: >
sudo apt-get install -y ngdevkit-gngeo python3-pygame imagemagick
sox libsox-fmt-mp3 libglew-dev libsdl2-dev
- name: Test by compiling ngdevkit-examples
run: ./.github/scripts/test.sh
win:
name: "Windows native MSYS2 build"
runs-on: windows-latest
env:
PY3PATH: ""
defaults:
run:
shell: msys2 {0}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
msystem: UCRT64
update: true
install:
git autoconf automake make zip
mingw-w64-ucrt-x86_64-pkg-config mingw-w64-ucrt-x86_64-python
mingw-w64-ucrt-x86_64-python-pygame
- name: Install ngdevkit dependencies
run: |
echo -e "[ngdevkit]\nSigLevel = Optional TrustAll\nServer = https://dciabrin.net/msys2-ngdevkit/\$arch" >> /etc/pacman.conf
pacman -Sy
pacman -S --noconfirm mingw-w64-ucrt-x86_64-ngdevkit-toolchain
- name: Build
run: ./.github/scripts/build-msys2.sh
macos:
name: "macOS build"
runs-on: macos-latest
env:
PREFIX: "/usr/local"
PY3PATH: "/usr/local/opt/python3/bin"
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Dependencies
run: |
brew tap dciabrin/ngdevkit
brew install automake ngdevkit-toolchain python3 zip pkg-config
$PY3PATH/pip3 install pygame
- name: Build
run: ./.github/scripts/build.sh
- name: Install dependencies for ngdevkit-examples
run: brew install ngdevkit-gngeo imagemagick sox glew sdl2 sdl2_image
- name: Test by compiling ngdevkit-examples
run: ./.github/scripts/test.sh
deploy_deb:
name: "deb: trigger Launchpad rebuild"
runs-on: ubuntu-latest
needs: [linux, macos, win]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Launchpad: trigger nightly deb rebuild"
run: .ci/trigger-launchpad-build.sh --slug="~dciabrin/ngdevkit/+git/ngdevkit" --name="Travis%20Deploy"
env:
LAUNCHPAD_TOKEN: ${{ secrets.LAUNCHPAD_TOKEN }}
LAUNCHPAD_TOKEN_SECRET: ${{ secrets.LAUNCHPAD_TOKEN_SECRET }}
deploy_rpm:
name: "rpm: trigger COPR rebuild"
runs-on: ubuntu-latest
needs: [linux, macos, win]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "COPR: push new nightly revision"
run: |
git config --global user.name 'CI build bot'
git config --global user.email '<>'
git config --global url."https://[email protected]/".insteadOf "https://github.com/"
git clone https://github.com/dciabrin/copr-ngdevkit .ci/copr-ngdevkit
.ci/copr-ngdevkit/.ci/bump-project-nightly-build.sh ngdevkit
.ci/copr-ngdevkit/.ci/trigger-copr-build.sh --package ngdevkit
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
COPR_SECRET: ${{ secrets.COPR_SECRET }}
LAUNCHPAD_TOKEN: ${{ secrets.LAUNCHPAD_TOKEN }}
LAUNCHPAD_TOKEN_SECRET: ${{ secrets.LAUNCHPAD_TOKEN_SECRET }}
deploy_brew:
name: "brew: trigger bottle rebuild"
runs-on: ubuntu-latest
needs: [linux, macos, win]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "Brew: push new nightly revision and bottle"
run: |
git config --global user.name 'CI build bot'
git config --global user.email '<>'
git config --global url."https://[email protected]/".insteadOf "https://github.com/"
git clone https://github.com/dciabrin/homebrew-ngdevkit .ci/homebrew-ngdevkit
.ci/homebrew-ngdevkit/.ci/bump-project-nightly-build.sh --package ngdevkit --batch
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
deploy_msys2:
name: "msys2: trigger package rebuild"
runs-on: ubuntu-latest
needs: [linux, macos, win]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: "MSYS2: push new nightly revision and rebuild package repository"
run: |
git config --global user.name 'CI build bot'
git config --global user.email '<>'
git config --global url."https://[email protected]/".insteadOf "https://github.com/"
git clone https://github.com/dciabrin/msys2-ngdevkit .ci/msys2-ngdevkit
.ci/msys2-ngdevkit/.ci/bump-project-nightly-build.sh --package ngdevkit --batch
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}
cleanup_tags:
name: "Cleanup tags and artefacts"
runs-on: ubuntu-latest
needs: [deploy_deb, deploy_rpm, deploy_brew, deploy_msys2]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: "Cleanup old nightly tags"
run: .ci/gc-nightly-tags.sh --user=dciabrin --repo=ngdevkit --tag-regex='^refs/tags/nightly-[0-9]*'
env:
GH_TOKEN: ${{ secrets.GH_TOKEN }}