Skip to content

Commit 0dc2940

Browse files
authored
ci: add xftp-server postgres binaries (#1766)
1 parent 8833e5c commit 0dc2940

1 file changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/build.yml

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ jobs:
173173
-v ${{ github.workspace }}:/project \
174174
build/${{ matrix.os }}:latest
175175
176-
- name: Build smp-server (postgresql) and tests
176+
- name: Build smp-server, xftp-server (postgresql) and tests
177177
if: matrix.should_run == true
178178
shell: docker exec -t builder sh -eu {0}
179179
run: |
@@ -182,32 +182,42 @@ jobs:
182182
cabal update
183183
cabal build --jobs=$(nproc) --enable-tests -fserver_postgres
184184
mkdir -p /out
185-
for i in smp-server simplexmq-test; do
185+
for i in smp-server xftp-server simplexmq-test; do
186186
bin=$(find /project/dist-newstyle -name "$i" -type f -executable)
187187
chmod +x "$bin"
188188
mv "$bin" /out/
189189
done
190-
strip /out/smp-server
190+
strip /out/smp-server /out/xftp-server
191191
192192
- name: Copy simplexmq-test from container
193193
if: matrix.should_run == true
194194
shell: bash
195195
run: |
196196
docker cp builder:/out/simplexmq-test .
197197
198-
- name: Copy smp-server (postgresql) from container and prepare it
198+
- name: Copy smp-server, xftp-server (postgresql) from container and prepare it
199199
if: startsWith(github.ref, 'refs/tags/v') && matrix.should_run == true
200200
id: prepare-postgres
201201
shell: bash
202202
run: |
203-
name="smp-server-postgres-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}"
204-
docker cp builder:/out/smp-server $name
203+
printf 'bins<<EOF\n' > bins.output
204+
printf 'hashes<<EOF\n' > hashes.output
205205
206-
path="${{ github.workspace }}/$name"
207-
echo "bin=$path" >> $GITHUB_OUTPUT
206+
for i in smp-server xftp-server; do
207+
name="${i}-postgres-ubuntu-${{ matrix.os_underscore }}-${{ matrix.arch }}"
208+
docker cp builder:/out/$i $name
208209
209-
hash="SHA2-256($name)= $(openssl sha256 $path | cut -d' ' -f 2)"
210-
printf 'hash=%s' "$hash" >> $GITHUB_OUTPUT
210+
path="${{ github.workspace }}/$name"
211+
hash="SHA2-256($name)= $(openssl sha256 $path | cut -d' ' -f 2)"
212+
213+
printf '%s\n' "$path" >> bins.output
214+
printf '%s\n\n' "$hash" >> hashes.output
215+
done
216+
printf 'EOF\n' >> bins.output
217+
printf 'EOF\n' >> hashes.output
218+
219+
cat bins.output >> "$GITHUB_OUTPUT"
220+
cat hashes.output >> "$GITHUB_OUTPUT"
211221
212222
- name: Build everything else (standard)
213223
if: matrix.should_run == true
@@ -257,10 +267,10 @@ jobs:
257267
fail_on_unmatched_files: true
258268
body: |
259269
${{ steps.prepare-regular.outputs.hashes }}
260-
${{ steps.prepare-postgres.outputs.hash }}
270+
${{ steps.prepare-postgres.outputs.hashes }}
261271
files: |
262272
${{ steps.prepare-regular.outputs.bins }}
263-
${{ steps.prepare-postgres.outputs.bin }}
273+
${{ steps.prepare-postgres.outputs.bins }}
264274
env:
265275
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
266276

0 commit comments

Comments
 (0)