-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Daniel Wagner <[email protected]>
- Loading branch information
Showing
12 changed files
with
450 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "weekly" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,125 @@ | ||
--- | ||
name: "🏗 Next" | ||
|
||
on: | ||
push: | ||
branch: | ||
- master | ||
|
||
jobs: | ||
build_staging: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: | ||
- debian | ||
name: debian staging build container | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
file: staging/Dockerfile.${{ matrix.type }}.staging | ||
platforms: linux/amd64 | ||
push: true | ||
provenance: false | ||
tags: | | ||
ghcr.io/igaw/linux-nvme/${{ matrix.type }}.staging:next | ||
build_tools: | ||
runs-on: ubuntu-latest | ||
name: build samurai and muon | ||
needs: build_staging | ||
container: | ||
image: ghcr.io/igaw/linux-nvme/debian.staging:next | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
scripts/build-muon.sh | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload artifacts | ||
with: | ||
name: samu-muon | ||
path: bin | ||
|
||
deploy_debian_containers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: | ||
- debian | ||
- debian.python | ||
needs: build_tools | ||
name: debian build containers | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: samu-muon | ||
path: bin | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: Dockerfile.${{ matrix.type }} | ||
platforms: linux/amd64 | ||
push: true | ||
provenance: false | ||
tags: | | ||
ghcr.io/igaw/linux-nvme/${{ matrix.type }}:next | ||
deploy_cross_containers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: | ||
- armhf | ||
- ppc64le | ||
- s390x | ||
name: ubuntu cross container | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
file: Dockerfile.ubuntu.${{ matrix.arch }} | ||
platforms: linux/amd64 | ||
push: true | ||
provenance: false | ||
tags: | | ||
ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:next |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
--- | ||
name: "♻ Cleanup GHCR" | ||
|
||
on: | ||
schedule: | ||
- cron: "0 0 * * 0" # At 00:00 on Sunday. | ||
|
||
jobs: | ||
clean-ghcr: | ||
name: cleanup images | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Delete old container images | ||
uses: snok/container-retention-policy@v2 | ||
id: retention | ||
with: | ||
image-names: linux-nvme* | ||
cut-off: One week ago UTC | ||
keep-at-least: 1 | ||
timestamp-to-use: updated_at | ||
skip-tags: latest | ||
account-type: personal | ||
token: ${{ secrets.PAT }} | ||
|
||
- name: Print Output | ||
run: |- | ||
echo "Failed cleanup for = ${{ steps.retention.outputs.failed }}" | ||
echo "Needs manual cleanup = ${{ steps.retention.outputs.needs-github-assistance }}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
--- | ||
name: "🚀 Release" | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*.*' | ||
|
||
jobs: | ||
build_staging: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: | ||
- debian | ||
name: debian staging build container | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
file: staging/Dockerfile.${{ matrix.type }}.staging | ||
platforms: linux/amd64 | ||
push: true | ||
provenance: false | ||
tags: | | ||
ghcr.io/igaw/linux-nvme/${{ matrix.type }}.staging:main | ||
build_tools: | ||
runs-on: ubuntu-latest | ||
name: build samurai and muon | ||
needs: build_staging | ||
container: | ||
image: ghcr.io/igaw/linux-nvme/debian.staging:main | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: build | ||
run: | | ||
scripts/build-muon.sh | ||
- uses: actions/upload-artifact@v4 | ||
name: Upload artifacts | ||
with: | ||
name: samu-muon | ||
path: bin | ||
|
||
deploy_debian_containers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
type: | ||
- debian | ||
- debian.python | ||
needs: build_tools | ||
name: debian build containers | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Get release | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: samu-muon | ||
path: bin | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
context: . | ||
file: Dockerfile.${{ matrix.type }} | ||
platforms: linux/amd64 | ||
push: true | ||
provenance: false | ||
tags: | | ||
ghcr.io/igaw/linux-nvme/${{ matrix.type }}:${{ env.RELEASE_VERSION }} | ||
ghcr.io/igaw/linux-nvme/${{ matrix.type }}:latest | ||
deploy_cross_containers: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
arch: | ||
- armhf | ||
- ppc64le | ||
- s390x | ||
name: ubuntu cross container | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Get release | ||
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | ||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
- name: Set up Docker Buildx | ||
uses: docker/[email protected] | ||
- name: Login to ghcr.io | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build image | ||
uses: docker/[email protected] | ||
with: | ||
file: Dockerfile.ubuntu.${{ matrix.arch }} | ||
platforms: linux/amd64 | ||
push: true | ||
provenance: false | ||
tags: | | ||
ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:${{ env.RELEASE_VERSION }} | ||
ghcr.io/igaw/linux-nvme/ubuntu-cross-${{ matrix.arch }}:latest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
FROM debian:bookworm-slim | ||
|
||
ARG TARGETPLATFORM | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=en_US.utf8 | ||
ENV TZ=Europe/Berlin | ||
RUN apt-get update && \ | ||
apt-get install -y locales tzdata && \ | ||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ | ||
apt-get install --no-install-recommends -y \ | ||
python3-distutils python3-openssl \ | ||
make meson gcc g++ clang pkg-config \ | ||
libjson-c-dev libssl-dev libkeyutils-dev libdbus-1-dev swig xz-utils \ | ||
ca-certificates git libcurl4 libarchive13 \ | ||
python3-sphinx asciidoc xmlto && \ | ||
apt-get update && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
COPY --chmod=755 bin/samu bin/muon /usr/bin |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM debian:bookworm-slim | ||
|
||
ARG TARGETPLATFORM | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=en_US.utf8 | ||
ENV TZ=Europe/Berlin | ||
RUN apt-get update && \ | ||
apt-get install -y locales tzdata && \ | ||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ | ||
apt-get install --no-install-recommends -y \ | ||
meson gcc g++ clang pkg-config git \ | ||
libjson-c-dev libssl-dev libkeyutils-dev libdbus-1-dev libpython3-dev \ | ||
pipx python3-dev swig xz-utils \ | ||
xz-utils \ | ||
lcov && \ | ||
apt-get update && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:jammy | ||
|
||
ARG TARGETPLATFORM | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=en_US.utf8 | ||
RUN dpkg --add-architecture armhf && \ | ||
sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list && \ | ||
echo "deb [arch=armhf] http://ports.ubuntu.com/ jammy main universe restricted" > /etc/apt/sources.list.d/armhf.list && \ | ||
echo "deb [arch=armhf] http://ports.ubuntu.com/ jammy-updates main universe restricted" >> /etc/apt/sources.list.d/armhf.list && \ | ||
apt-get update && \ | ||
apt-get install -y locales && \ | ||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ | ||
apt-get install --no-install-recommends -y \ | ||
meson pkg-config ca-certificates git qemu-user-static \ | ||
gcc-arm-linux-gnueabihf libc-dev:armhf libjson-c-dev:armhf \ | ||
xz-utils && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:jammy | ||
|
||
ARG TARGETPLATFORM | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=en_US.utf8 | ||
RUN dpkg --add-architecture ppc64el && \ | ||
sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list && \ | ||
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ jammy main universe restricted" > /etc/apt/sources.list.d/ppc64le.list && \ | ||
echo "deb [arch=ppc64el] http://ports.ubuntu.com/ jammy-updates main universe restricted" >> /etc/apt/sources.list.d/ppc64le.list && \ | ||
apt-get update && \ | ||
apt-get install -y locales && \ | ||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ | ||
apt-get install --no-install-recommends -y \ | ||
meson pkg-config ca-certificates git qemu-user-static \ | ||
gcc-powerpc64le-linux-gnu libc-dev:ppc64el libjson-c-dev:ppc64el \ | ||
xz-utils && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM ubuntu:jammy | ||
|
||
ARG TARGETPLATFORM | ||
ARG DEBIAN_FRONTEND=noninteractive | ||
ENV LANG=en_US.utf8 | ||
RUN dpkg --add-architecture s390x && \ | ||
sed -i -e 's/deb http/deb [arch=amd64] http/g' /etc/apt/sources.list && \ | ||
echo "deb [arch=s390x] http://ports.ubuntu.com/ jammy main universe restricted" > /etc/apt/sources.list.d/armhf.list && \ | ||
echo "deb [arch=s390x] http://ports.ubuntu.com/ jammy-updates main universe restricted" >> /etc/apt/sources.list.d/armhf.list && \ | ||
apt-get update && \ | ||
apt-get install -y locales && \ | ||
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \ | ||
apt-get install --no-install-recommends -y \ | ||
meson pkg-config ca-certificates git qemu-user-static \ | ||
gcc-s390x-linux-gnu libc-dev:s390x libjson-c-dev:s390x \ | ||
xz-utils && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
|
||
for dockerfile in Dockerfile.*; do | ||
docker buildx build --platform linux/amd64 . -f "${dockerfile}" | ||
done |
Oops, something went wrong.