-
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (76 loc) · 2.52 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
name: Build
on:
push:
workflow_dispatch:
inputs:
debug_enabled:
description: 'Run the build with tmate set "debug_enabled"'
type: boolean
required: false
default: false
defaults:
run:
shell: bash
permissions:
contents: write
env:
BUILDKIT_PROGRESS: plain
jobs:
tests:
runs-on: ubuntu-24.04
strategy:
matrix:
dbversion: ["5.7.44", "8.0.36", "8.4.0"]
arch: ["amd64", "arm64"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- name: Setup tmate session
uses: mxschmitt/action-tmate@v3
with:
limit-access-to-actor: true
if: ${{ github.event_name == 'workflow_dispatch' && inputs.debug_enabled }}
- name: Run basic docker container
run: |
docker run --rm debian:bookworm bash -c 'arch && cat /etc/*release*'
- name: Set up for multi-arch
run: sudo docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
- name: Build mysql clients
run: |
./build-clients.sh --mysql-version ${{ matrix.dbversion }} --arch ${{ matrix.arch }}
- name: "Tar up the binaries"
run: |
MYSQL_VERSION="${{ matrix.dbversion }}"
# Remove the patch version from the tarball name
MINOR_MYSQL_VERSION=${MYSQL_VERSION%.*}
tar -C ./mysql_${{ matrix.dbversion }}/built_${{ matrix.dbversion }}_${{ matrix.arch }}/bin/ -czf ./mysql-${MINOR_MYSQL_VERSION}-${{ matrix.arch }}.tar.gz mysql mysqldump
- name: "upload mysql-${{ matrix.dbversion }}-${{ matrix.arch }}"
uses: actions/upload-artifact@v4
with:
name: mysql-${{ matrix.dbversion }}-${{ matrix.arch }}
path: ./mysql-*-${{ matrix.arch }}.tar.gz
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
release:
runs-on: ubuntu-24.04
needs: tests
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
with:
path: ./artifacts
- name: Show content of ./artifacts
run: ls -lR ./artifacts || true
- name: Add files to release
uses: softprops/action-gh-release@v2
with:
files: ./artifacts/*/*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3