Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate from Buildkite to GitHub actions #84

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 0 additions & 72 deletions .buildkite/pipeline.sh

This file was deleted.

68 changes: 68 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
name: "Build the images, also push them if merged on main"

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 3
matrix:
target:
- { directory: rhel, label: "🐧 Glibc build images" }
- { directory: musl, label: "🐧 Musl (dynamic) build images" }
- { directory: linux-static, label: "🐧 Musl (static) build images" }
- { directory: cross, label: "🦀🍏🖥️ Cross compilation images" }
- { directory: test, label: "🦀 Test image" }
- { directory: release, label: "🦀 Release image" }
- { directory: sql_server, label: "🛢️ SQL Server images" }
- { directory: mongo, label: "🍃 Mongo single-replica images" }
- { directory: cockroach, label: "🪳 CockroachDB custom images" }
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Build ${{matrix.target.label}}"
env:
DOCKER_HUB_TOKEN: ${{secrets.DOCKER_HUB_TOKEN}}
run: |
echo "Building ${{matrix.target.label}}"
cd "${{matrix.target.directory}}"
make build

push:
if: github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
timeout-minutes: 60
strategy:
max-parallel: 3
matrix:
target:
- { directory: rhel, label: "🐧 Glibc build images" }
- { directory: musl, label: "🐧 Musl (dynamic) build images" }
- { directory: linux-static, label: "🐧 Musl (static) build images" }
- { directory: cross, label: "🦀🍏🖥️ Cross compilation images" }
- { directory: test, label: "🦀 Test image" }
- { directory: release, label: "🦀 Release image" }
- { directory: sql_server, label: "🛢️ SQL Server images" }
- { directory: mongo, label: "🍃 Mongo single-replica images" }
- { directory: cockroach, label: "🪳 CockroachDB custom images" }
steps:
- name: "Checkout repository"
uses: actions/checkout@v4

- name: "Build and push ${{matrix.target.label}}"
env:
DOCKER_HUB_TOKEN: ${{secrets.DOCKER_HUB_TOKEN}}
run: |
echo "Building and pushing ${{matrix.target.label}}"
cd "${{matrix.target.directory}}"
make build
echo "$DOCKER_HUB_TOKEN" | docker login -u "$DOCKER_HUB_USERNAME" --password-stdin
make push
11 changes: 8 additions & 3 deletions linux-static/linux-static-arm64.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,19 @@ COPY ./aarch64-musl-config.mak /tmp/config.mak
# Build cross-compiling toolchain using https://github.com/richfelker/musl-cross-make,
# https://github.com/rust-cross/rust-musl-cross.
# See also `../cross/linux-musl-arm.Dockerfile`.
RUN cd /tmp && \
RUN set -x && \
cd /tmp && \
ls -la /tmp && \
git clone --depth 1 https://github.com/richfelker/musl-cross-make.git --branch v0.9.10 && \
ls -laR /tmp/musl-cross-make && \
cp /tmp/config.mak /tmp/musl-cross-make/config.mak && \
cd /tmp/musl-cross-make && \
export CFLAGS="-fPIC -g1" && \
export TARGET=aarch64-unknown-linux-musl && \
make -j$(nproc) && make install && \
cd /tmp && rm -rf /tmp/musl-cross-make
make -j$(nproc) && \
make install && \
cd /tmp && \
rm -rf /tmp/musl-cross-make

RUN curl https://sh.rustup.rs -sSf | sh -s -- -y
RUN rustup target add aarch64-unknown-linux-musl
Expand Down
Loading