ci: parallelize steps for regenerating bindings vs building linux64

This commit is contained in:
mappu 2024-09-14 16:24:00 +12:00
parent ab11c1ae59
commit 82f8063df5
3 changed files with 27 additions and 13 deletions

View File

@ -7,6 +7,28 @@ on:
branches: [ "**" ] branches: [ "**" ]
jobs: jobs:
miqt_genbindings:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Linux64 docker build
run: cd docker && docker build -t miqt/linux64:latest -f genbindings.Dockerfile .
- name: Cache clang ASTs
uses: actions/cache@v4
with:
path: cmd/genbindings/cachedir
key: linux64-clang-cache
- name: Rebuild binding source
run: docker run -v ~/.cache/go-build:/root/.cache/go-build -v $PWD:/src -w /src miqt/linux64:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings'
- name: Assert no changes
run: git update-index --really-refresh && git diff-index HEAD
miqt_linux64: miqt_linux64:
runs-on: ubuntu-22.04 runs-on: ubuntu-22.04
@ -17,24 +39,12 @@ jobs:
- name: Linux64 docker build - name: Linux64 docker build
run: cd docker && docker build -t miqt/linux64:latest -f linux64-go1.19-qt5.15-dynamic.Dockerfile . run: cd docker && docker build -t miqt/linux64:latest -f linux64-go1.19-qt5.15-dynamic.Dockerfile .
- name: Cache clang ASTs
uses: actions/cache@v4
with:
path: cmd/genbindings/cachedir
key: linux64-clang-cache
- name: Cache GOCACHE - name: Cache GOCACHE
uses: actions/cache@v4 uses: actions/cache@v4
with: with:
path: ~/.cache/go-build path: ~/.cache/go-build
key: linux64-gocache key: linux64-gocache
- name: Rebuild binding source
run: docker run -v ~/.cache/go-build:/root/.cache/go-build -v $PWD:/src -w /src miqt/linux64:latest /bin/bash -c 'cd cmd/genbindings && go build && ./genbindings'
- name: Assert no changes
run: git update-index --really-refresh && git diff-index HEAD
- name: Linux64 bindings compile - name: Linux64 bindings compile
run: docker run -v ~/.cache/go-build:/root/.cache/go-build -v $PWD:/src -w /src miqt/linux64:latest /bin/bash -c 'cd qt && go build' run: docker run -v ~/.cache/go-build:/root/.cache/go-build -v $PWD:/src -w /src miqt/linux64:latest /bin/bash -c 'cd qt && go build'

View File

@ -0,0 +1,4 @@
FROM debian:bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy golang-go qtbase5-dev clang

View File

@ -1,4 +1,4 @@
FROM debian:bookworm FROM debian:bookworm
RUN DEBIAN_FRONTEND=noninteractive apt-get update && \ RUN DEBIAN_FRONTEND=noninteractive apt-get update && \
apt-get install -qyy gnupg2 golang-go qtbase5-dev ca-certificates clang apt-get install -qyy golang-go qtbase5-dev