-
Notifications
You must be signed in to change notification settings - Fork 22
166 lines (164 loc) · 5.06 KB
/
static.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
name: Publish latest imaptest
on:
pull_request:
push:
paths:
- 'src/**'
workflow_dispatch:
jobs:
build_ubuntu:
strategy:
matrix:
include:
- os: ubuntu-24.04
image: ubuntu-24.04
- os: ubuntu-22.04
image: ubuntu-22.04
- os: ubuntu-20.04
image: ubuntu-20.04
- os: debian-11
image: ubuntu-20.04
- os: debian-12
image: ubuntu-22.04
runs-on: ${{ matrix.image }}
steps:
- name: Checkout imaptest
uses: actions/checkout@v4
with:
path: imaptest
- name: Checkout dovecot
uses: actions/checkout@v4
with:
repository: dovecot/core
path: core
- name: Install gettext (missing from GH Actions image)
run: |
sudo apt install -y gettext
- name: Build dovecot libraries
working-directory: ${{ github.workspace }}/core
run: |
./autogen.sh
./configure
make -j8
- name: Build imaptest
working-directory: ${{ github.workspace }}/imaptest
run: |
./autogen.sh
./configure --with-dovecot=../core
make -j8
- name: Strip imaptest
run: |
strip --strip-all imaptest/src/imaptest
- name: Rename artifact
run: |
mv imaptest/src/imaptest imaptest-x86_64-${{ matrix.os }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-x86_64-${{ matrix.os }}
path: imaptest-x86_64-${{ matrix.os }}
build_rhel:
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }}
strategy:
matrix:
include:
- os: rhel8
container: registry.access.redhat.com/ubi8/ubi
stream: https://vault.centos.org/8-stream
- os: rhel9
container: registry.access.redhat.com/ubi9/ubi
stream: https://mirror.stream.centos.org/9-stream/
runs-on: ubuntu-latest
container:
image: ${{ matrix.container }}
steps:
- name: Checkout imaptest
uses: actions/checkout@v4
with:
path: imaptest
- name: Checkout dovecot
uses: actions/checkout@v4
with:
repository: dovecot/core
path: core
- name: Install build dependencies
run: |
dnf makecache
dnf install -y gcc gcc-c++ make automake autoconf libtool pkgconf-pkg-config gettext zlib-devel openssl-devel autoconf-archive diffutils file wget git
- name: Add repositories
run: |
cat <<EOF > /etc/yum.repos.d/stream.repo
[${{ matrix.os }}-stream_baseos]
name = ${{ matrix.os }} - stream baseos
baseurl = ${{ matrix.stream }}/BaseOS/x86_64/os
gpgcheck = 0
enabled = 1
[${{ matrix.so }}-stream_appstream]
name = ${{ matrix.os }} - stream appstream
baseurl = ${{ matrix.stream }}/AppStream/x86_64/os
gpgcheck = 0
enabled = 1
EOF
- name: Install more build dependencies
run: |
dnf makecache
dnf install -y gettext-devel bison flex
- name: Force-enable pic
run: |
sed -s -i -e 's/LT_INIT/LT_INIT([pic-only])/' core/configure.ac
- name: Build dovecot libraries
working-directory: ${{ github.workspace }}/core
run: |
env VERSION=0.0.0 ./autogen.sh
./configure
make -j8
- name: Build imaptest
working-directory: ${{ github.workspace }}/imaptest
run: |
env VERSION=0.0.0 ./autogen.sh
./configure --with-dovecot=../core
make -j8
- name: Strip imaptest
run: |
strip --strip-all imaptest/src/imaptest
- name: Rename artifact
run: |
mv imaptest/src/imaptest imaptest-x86_64-${{ matrix.os }}
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: build-x86_64-${{ matrix.os }}
path: imaptest-x86_64-${{ matrix.os }}
publish:
if: ${{ github.repository == 'dovecot/imaptest' && github.ref == 'refs/heads/main' }}
needs:
- build_ubuntu
- build_rhel
runs-on: ubuntu-latest
steps:
- name: Download items
uses: actions/download-artifact@v4
with:
path: build
merge-multiple: true
- name: List files
run: |
find
- name: Generate SHA256SUMS.txt
working-directory: build
run: |
sha256sum imaptest-* > SHA256SUMS.txt
- name: Update latest Release
uses: andelf/nightly-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: latest
name: 'ImapTest Latest Release'
draft: false
body: |
ImapTest semi-static builds. These work on most machines with matching
libc. These usually work with Debian as well.
files: |
build/imaptest-*
build/SHA256SUMS.txt