forked from megastep/makeself
-
Notifications
You must be signed in to change notification settings - Fork 0
177 lines (151 loc) · 4.62 KB
/
build.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
name: CI
on: [push, pull_request]
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
container: 'ubuntu:latest'
artifact: 'ubuntu'
- os: ubicloud
container: 'alpine:latest'
artifact: 'alpine'
- os: ubicloud
container: 'rockylinux:9' # they do not have latest, but 9 will be covered for all the defaults for all latest 9 version
artifact: 'rockylinux'
- os: windows-latest
artifact: 'windows'
- os: macos-latest
artifact: 'macos'
container: ${{ matrix.container }}
steps:
- name: Install Ubuntu packages
if: matrix.container == 'ubuntu:latest'
run: |
apt update
apt -y install git make pbzip2 binutils bzip2 zstd gnupg
- name: Install RockyLinux packages
if: matrix.container == 'rockylinux:9'
run: |
dnf groupinstall -y "Development Tools" "RPM Development Tools"
dnf install -y zstd binutils binutils-devel gnupg2 pbzip2
- name: Install Alpine packages
if: matrix.container == 'alpine:latest'
run: apk add --no-cache bash git make libarchive-tools gnupg coreutils binutils bzip2 zstd
- name: Install macOS packages
if: runner.os == 'macOS'
run: brew install pbzip2 coreutils zstd
- name: Checkout Makeself
uses: actions/checkout@v4
with:
submodules: 'true'
- name: Build release
run: make
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.artifact }}
path: release
- name: Run tests
run: make test
test-freebsd:
needs: test
runs-on: ubuntu-latest
name: Test Makeself on FreeBSD
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Test on FreeBSD
uses: vmactions/freebsd-vm@v1
with:
usesh: true
prepare: pkg install -y pbzip2
run: |
pwd; freebsd-version
sh ./test/run-makeself.sh
test-openbsd:
needs: test
runs-on: ubuntu-latest
name: Test Makeself on OpenBSD
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Test on OpenBSD
uses: vmactions/openbsd-vm@v1
with:
usesh: true
prepare: /usr/sbin/pkg_add pbzip2
run: |
pwd
sh ./test/run-makeself.sh
test-netbsd:
needs: test
runs-on: ubuntu-latest
name: Test Makeself on NetBSD
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Test on NetBSD
uses: vmactions/netbsd-vm@v1
with:
usesh: true
prepare: /usr/sbin/pkg_add pbzip2
run: |
pwd
sh ./test/run-makeself.sh
test-solaris:
needs: test
runs-on: ubuntu-latest
name: Test Makeself on Solaris
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Test on Solaris
uses: vmactions/solaris-vm@v1
with:
mem: 2048
prepare: pkgutil -y -i pbzip2
run: |
pwd
sh ./test/run-makeself.sh
test-alpine:
needs: test
name: Test Makeself on Alpine
runs-on: ubuntu-latest
container: alpine:latest
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: Test on Alpine
run: sh ./test/run-makeself.sh
test-nanoserver:
needs: test
name: Test Makeself on Nanoserver
runs-on: windows-2022
env:
IMAGE_NAME: mcr.microsoft.com/windows/nanoserver:ltsc2022-amd64
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- name: pull windows container ${{ env.IMAGE_NAME }}
shell: cmd
run: |
docker pull ${{ env.IMAGE_NAME }}
docker images ${{ env.IMAGE_NAME }}
- name: download tools
shell: cmd
run: curl --fail --silent --show-error --remote-name --location "https://frippery.org/files/busybox/busybox64.exe"
- name: Test on Nanoserver
shell: cmd
run: docker container run --rm --env CI=true -v ${{ github.workspace }}:C:\app -w C:\app ${{ env.IMAGE_NAME }} C:\app\busybox64.exe sh ./test/run-makeself.sh
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout Makeself
uses: actions/checkout@v4
- name: Run ShellCheck
uses: megastep/shell-linter@develop
with:
path: "makeself.sh"
severity: "error"