From ca00bffc8595aa7e2cbeb2fab1b1bce4aead4a61 Mon Sep 17 00:00:00 2001 From: sfja Date: Mon, 30 Mar 2026 10:28:16 +0200 Subject: [PATCH] split up pipelines --- .github/workflows/backend.yml | 24 +++++++++++++ .github/workflows/game.yml | 29 ++++++++++++++++ .github/workflows/skateboard.yml | 24 +++++++++++++ .github/workflows/verify.yml | 59 -------------------------------- ci-image/backend/Dockerfile | 3 ++ ci-image/backend/publish.sh | 10 ++++++ ci-image/{ => game}/Dockerfile | 4 +-- ci-image/game/publish.sh | 10 ++++++ ci-image/publish.sh | 18 ---------- 9 files changed, 102 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/backend.yml create mode 100644 .github/workflows/game.yml create mode 100644 .github/workflows/skateboard.yml delete mode 100644 .github/workflows/verify.yml create mode 100644 ci-image/backend/Dockerfile create mode 100755 ci-image/backend/publish.sh rename ci-image/{ => game}/Dockerfile (55%) create mode 100755 ci-image/game/publish.sh delete mode 100755 ci-image/publish.sh diff --git a/.github/workflows/backend.yml b/.github/workflows/backend.yml new file mode 100644 index 0000000..96386f6 --- /dev/null +++ b/.github/workflows/backend.yml @@ -0,0 +1,24 @@ +name: Backend + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + verify: + runs-on: ubuntu-latest + container: sfja/h5-mst-ci:backend-ci + steps: + - uses: actions/checkout@v6 + - name: Check + working-directory: ./backend + run: make check + - name: Build + working-directory: ./backend + run: make all + - name: Test + working-directory: ./backend + run: make test + diff --git a/.github/workflows/game.yml b/.github/workflows/game.yml new file mode 100644 index 0000000..32e32d4 --- /dev/null +++ b/.github/workflows/game.yml @@ -0,0 +1,29 @@ +name: Game + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + verify: + runs-on: ubuntu-latest + container: sfja/h5-mst-ci:game-ci + steps: + - uses: actions/checkout@v6 + - run: rustup default stable + - name: Check + working-directory: ./game + run: cargo check + - name: Clippy + working-directory: ./game + continue-on-error: true + run: cargo clippy + - name: Build + working-directory: ./game + run: cargo build + - name: Test + working-directory: ./game + run: cargo test + diff --git a/.github/workflows/skateboard.yml b/.github/workflows/skateboard.yml new file mode 100644 index 0000000..67f2570 --- /dev/null +++ b/.github/workflows/skateboard.yml @@ -0,0 +1,24 @@ +name: Skateboard + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + verify: + runs-on: ubuntu-latest + container: espressif/idf:release-v5.5 + steps: + - uses: actions/checkout@v6 + - name: Build + shell: bash + working-directory: ./skateboard + # https://github.com/espressif/esp-bsp/blob/master/.github/workflows/build-run-applications.yml + run: | + export IDF_PYTHON_CHECK_CONSTRAINTS=yes + ${IDF_PATH}/install.sh --enable-ci + source ${IDF_PATH}/export.sh + idf.py build + diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml deleted file mode 100644 index 630221c..0000000 --- a/.github/workflows/verify.yml +++ /dev/null @@ -1,59 +0,0 @@ -name: Verify - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - backend: - runs-on: ubuntu-latest - container: sfja/h5-mst-ci:latest - steps: - - uses: actions/checkout@v6 - - name: Check - working-directory: ./backend - run: make check - - name: Build - working-directory: ./backend - run: make all - - name: Test - working-directory: ./backend - run: make test - - game: - runs-on: ubuntu-latest - container: sfja/h5-mst-ci:latest - steps: - - uses: actions/checkout@v6 - - run: rustup default stable - - name: Check - working-directory: ./game - run: cargo check - - name: Clippy - working-directory: ./game - continue-on-error: true - run: cargo clippy - - name: Build - working-directory: ./game - run: cargo build - - name: Test - working-directory: ./game - run: cargo test - - skateboard: - runs-on: ubuntu-latest - container: espressif/idf:release-v5.5 - steps: - - uses: actions/checkout@v6 - - name: Build - shell: bash - working-directory: ./skateboard - # https://github.com/espressif/esp-bsp/blob/master/.github/workflows/build-run-applications.yml - run: | - export IDF_PYTHON_CHECK_CONSTRAINTS=yes - ${IDF_PATH}/install.sh --enable-ci - source ${IDF_PATH}/export.sh - idf.py build - diff --git a/ci-image/backend/Dockerfile b/ci-image/backend/Dockerfile new file mode 100644 index 0000000..17b0bba --- /dev/null +++ b/ci-image/backend/Dockerfile @@ -0,0 +1,3 @@ +FROM alpine:edge +RUN apk add --no-cache curl build-base clang22-extra-tools mosquitto-dev + diff --git a/ci-image/backend/publish.sh b/ci-image/backend/publish.sh new file mode 100755 index 0000000..db8f398 --- /dev/null +++ b/ci-image/backend/publish.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +tag=sfja/h5-mst-ci:backend-ci + +set -xe + +docker build -t $tag . + +docker push $tag + diff --git a/ci-image/Dockerfile b/ci-image/game/Dockerfile similarity index 55% rename from ci-image/Dockerfile rename to ci-image/game/Dockerfile index f9636fb..082e3f1 100644 --- a/ci-image/Dockerfile +++ b/ci-image/game/Dockerfile @@ -1,5 +1,5 @@ -FROM alpine:edge -RUN apk add --no-cache curl build-base clang22-extra-tools mosquitto-dev sdl3-dev +FROM alpine:3.23 +RUN apk add --no-cache curl build-base sdl3-dev RUN curl https://sh.rustup.rs -sSf \ | sh -s -- --default-toolchain stable -y diff --git a/ci-image/game/publish.sh b/ci-image/game/publish.sh new file mode 100755 index 0000000..c2e929d --- /dev/null +++ b/ci-image/game/publish.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +tag=sfja/h5-mst-ci:game-ci + +set -xe + +docker build -t $tag . + +docker push $tag + diff --git a/ci-image/publish.sh b/ci-image/publish.sh deleted file mode 100755 index 6fb8bc2..0000000 --- a/ci-image/publish.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -version=$1 - -if [[ $version == "" ]]; then - echo "Please specify version" - echo "./publish.sh " - exit 1 -fi - -tag=sfja/h5-mst-ci:$version - -set -xe - -docker build -t $tag . - -docker push $tag -