-
Notifications
You must be signed in to change notification settings - Fork 1.2k
192 lines (177 loc) · 5.77 KB
/
Copy pathrelease.yml
File metadata and controls
192 lines (177 loc) · 5.77 KB
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
name: Version Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
env:
RELEASE_DIR: build-release
jobs:
create-release:
runs-on: ubuntu-latest
steps:
- name: Create Release
uses: ncipollo/release-action@v1.21.0
with:
allowUpdates: true
omitBody: true
skipIfReleaseExists: true
prerelease: true
draft: true
generateReleaseNotes: true
updateOnlyUnreleased: true
commit: ${{ github.sha }}
token: ${{ secrets.GITHUB_TOKEN }}
build-arm:
runs-on: ubuntu-24.04-arm
name: Build arm64 on ubuntu-24.04-arm
needs: create-release
container:
image: ghcr.io/romange/ubuntu-dev:20-gcc14
options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0"
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Build artifacts
run: |
# Work around https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git describe --always --tags ${{ github.sha }}
./tools/release.sh
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-aarch64
mv dragonfly_*.deb ${{ env.RELEASE_DIR }}/
- name: Upload
uses: actions/upload-artifact@v7
with:
name: dragonfly-aarch64
path: |
${{ env.RELEASE_DIR }}/dragonfly-*tar.gz
${{ env.RELEASE_DIR }}/dragonfly_*.deb
${{ env.RELEASE_DIR }}/dfly_bench-*.tar.gz
build-native:
runs-on: ubuntu-latest
needs: create-release
strategy:
matrix:
include:
# Build with these flags
- name: debian
container: ubuntu-dev:20-gcc14
- name: rpm
container: fedora:30-gcc14
container:
image: ghcr.io/romange/${{ matrix.container }}
options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0"
# Some tests which launch their own containers need a mounted volume to write through files
# into child containers
volumes:
- /mnt:/mnt
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Configure
run: |
if [ -f /etc/redhat-release ]; then
dnf install -y rpm-build libstdc++-static
fi
- name: Build artifacts
timeout-minutes: 25
run: |
# Work around https://github.com/actions/checkout/issues/766
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git describe --always --tags ${{ github.sha }}
# set WITH_SIMSIMD=OFF for fedora:30
if [ "${{ matrix.name }}" == 'rpm' ]; then
export WITH_SIMSIMD="OFF"
fi
./tools/release.sh
# once the build is over, we want to generate a Debian package
if [ -f /etc/debian_version ]; then
./tools/packaging/generate_debian_package.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64
else
echo "Creating package for ${{github.ref_name}}"
./tools/packaging/rpm/build_rpm.sh ${{ env.RELEASE_DIR }}/dragonfly-x86_64.tar.gz ${{github.ref_name}}
fi
- name: Save artifacts
run: |
# place all artifacts at the same location
set -eu
mkdir -p results-artifacts
if [ -f /etc/debian_version ]; then
mv ${{ env.RELEASE_DIR }}/dragonfly-*tar.gz results-artifacts
mv dragonfly_*.deb results-artifacts
mv ${{ env.RELEASE_DIR }}/dfly_bench-*tar.gz results-artifacts
else
ls -l *.rpm
mv ./*.rpm ./results-artifacts/
fi
- name: Upload
uses: actions/upload-artifact@v7
with:
name: dragonfly-amd64-${{ matrix.name }}
path: results-artifacts/*
test-regression:
needs: [build-native, build-arm]
runs-on: ${{ matrix.runner }}
strategy:
matrix:
include:
- name: amd64
runner: ubuntu-latest
artifact: dragonfly-amd64-debian
binary: dragonfly-x86_64
- name: arm64
runner: ubuntu-24.04-arm
artifact: dragonfly-aarch64
binary: dragonfly-aarch64
container:
image: ghcr.io/romange/ubuntu-dev:24
options: --security-opt seccomp=unconfined --sysctl "net.ipv6.conf.all.disable_ipv6=0"
volumes:
- /mnt:/mnt
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Download artifacts
uses: actions/download-artifact@v8
with:
name: ${{ matrix.artifact }}
path: results-artifacts
- name: Extract artifacts
run: |
set -eu
mkdir -p ${{ env.RELEASE_DIR }}
tar -xzf results-artifacts/dragonfly-*dbgsym.tar.gz -C ${{ env.RELEASE_DIR }}
ls -lh results-artifacts/
ls -lh ${{ env.RELEASE_DIR }}/
- name: Run regression tests
uses: ./.github/actions/regression-tests
with:
dfly-executable: dragonfly
gspace-secret: ${{ secrets.GSPACES_BOT_DF_BUILD }}
build-folder-name: ${{ env.RELEASE_DIR }}
filter: 'not debug_only'
publish_release:
runs-on: ubuntu-latest
needs: test-regression
steps:
- uses: actions/download-artifact@v8
name: Download files
with:
path: artifacts
- name: See all the artifacts
run: |
ls -lR artifacts/
- uses: ncipollo/release-action@v1.21.0
with:
artifacts: "artifacts/dragonfly-*/*"
allowUpdates: true
draft: true
updateOnlyUnreleased: true
prerelease: true
omitNameDuringUpdate: true
token: ${{ secrets.GITHUB_TOKEN }}