-
Notifications
You must be signed in to change notification settings - Fork 5
159 lines (137 loc) · 4.36 KB
/
build_dist.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
name: Build distribution
on:
push:
branches: [ master ]
tags: [ '*' ]
env:
SHELL: /bin/bash
jobs:
buildNative:
runs-on: ubuntu-latest
container: archlinux/archlinux:multilib-devel
steps:
# Install packages
- run: pacman --noconfirm -Sy sbt jdk-openjdk git mingw-w64 clang nasm rustup python3
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: i686-pc-windows-gnu
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: i686-unknown-linux-gnu
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git config --global --add safe.directory /__w/MPPatch/MPPatch
- run: git fetch --prune --unshallow --tags
# Do the actual build
- run: scripts/ci/build-natives_linux.sh
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_ci_natives-linux.tar.gz
path: target/mppatch_ci_natives-linux.tar.gz
buildInstallerLinux:
runs-on: ubuntu-latest
needs:
- buildNative
steps:
# Install packages
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '21'
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git fetch --prune --unshallow --tags
# Download artifacts
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_natives-linux.tar.gz
path: target/mppatch_ci_natives-linux
- run: mv target/mppatch_ci_natives-linux/* target/
- run: rm -rf target/mppatch_ci_natives-linux
# Do the actual build
- run: scripts/ci/build-installer_linux.sh
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_ci_installer-linux.tar.gz
path: target/mppatch_ci_installer-linux.tar.gz
buildInstallerWindows:
runs-on: windows-latest
needs:
- buildNative
steps:
# Install packages
- uses: actions/setup-java@v3
with:
distribution: 'liberica'
java-version: '21'
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git fetch --prune --unshallow --tags
# Install dependencies
- name: Install NSIS
run: |
iwr -useb get.scoop.sh -outfile 'install.ps1'
.\install.ps1 -RunAsAdmin
scoop update
scoop bucket add extras
scoop install nsis
- uses: GuillaumeFalourd/setup-windows10-sdk-action@v1.12
# Download artifacts
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_natives-linux.tar.gz
path: target/mppatch_ci_natives-linux
- run: mv target/mppatch_ci_natives-linux/* target/
- run: rm -Recurse -Force -Verbose target/mppatch_ci_natives-linux
# Do the actual build
- run: scripts/ci/build-installer_win32.ps1
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_ci_installer-win32.tar.gz
path: target/mppatch_ci_installer-win32.tar.gz
buildDist:
runs-on: ubuntu-20.04
needs:
- buildInstallerLinux
- buildInstallerWindows
steps:
# Initialize git
- uses: actions/checkout@v2
with:
submodules: 'recursive'
- run: git fetch --prune --unshallow --tags
# Download artifacts
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_installer-linux.tar.gz
path: target/mppatch_ci_installer-linux
- run: mv target/mppatch_ci_installer-linux/* target/
- run: rm -rf target/mppatch_ci_installer-linux
- uses: actions/download-artifact@v3
with:
name: mppatch_ci_installer-win32.tar.gz
path: target/mppatch_ci_installer-win32
- run: mv target/mppatch_ci_installer-win32/* target/
- run: rm -rf target/mppatch_ci_installer-win32
# Do the actual build
- run: scripts/ci/build-dist.sh
# Upload artifacts
- uses: actions/upload-artifact@v3
with:
name: mppatch_dist.tar.gz
path: mppatch_dist.tar.gz