Skip to content

build them all

build them all #3

Workflow file for this run

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.42", "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: |
tar -C ./mysql_${{ matrix.dbversion }}/built_${{ matrix.dbversion }}_${{ matrix.arch }}/bin/ -czf ./mysql-${{ matrix.dbversion }}-${{ matrix.arch }}.tar.gz .
- name: "upload mysql-${{ matrix.dbversion }}-${{ matrix.arch }}"
uses: actions/upload-artifact@v4
with:
name: mysql-${{ matrix.dbversion }}-${{ matrix.arch }}
path: "./mysql-${{ matrix.dbversion }}-${{ 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
- 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
# - name: Upload Release Assets
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: |
# for file in $(find ./artifacts -type f); do
# gh release upload "${{ github.ref }}" "$file" --clobber
# done