|
From: kosmirror <kos...@us...> - 2025-10-11 17:04:42
|
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "A pseudo Operating System for the Dreamcast.".
The branch, master has been updated
via d5f06d52f7b32af94c49ebf740d55ab0e7487967 (commit)
via b5e4fada28fd073fe85b4d6b22527851c9deb2ce (commit)
via c0e554920353b16b272f3aef2889040aacc6fb0e (commit)
via 8c1c79603c5be611f0cb83039b222a2389fda820 (commit)
via ed2fd5eec43b586c4217fce7f455d5807fe7b3e3 (commit)
via fd6e66dfa66a408afea03494735bd73eb490aa15 (commit)
via e8d2f25ac887164ed55c452c31464e23a8d6919e (commit)
from 37b3e38e701109afc0add0158fed74b3398ff1f3 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit d5f06d52f7b32af94c49ebf740d55ab0e7487967
Author: Paul Cercueil <pa...@cr...>
Date: Mon May 26 15:31:01 2025 +0200
CI: Add autobuilder for KallistiOS
Build all the toolchains we have a profile for, as Docker images.
The toolchains are only built when toolchain-specific or CI files
change, which means that they are only rebuilt when needed.
In a second step, those toolchains are used to build KallistiOS itself.
When the toolchains don't need to be updated, only KallistiOS is built,
which is extremely fast (around 2 minutes vs. 40+ minutes for a full
build).
When a PR is merged to the master branch, and the toolchains need to be
updated, the Docker images will be pushed to Docker Hub, which is used
to host the latest toolchain images.
Those toolchain images will be automatically downloaded and used in the
case where only KallistiOS is built.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit b5e4fada28fd073fe85b4d6b22527851c9deb2ce
Author: Paul Cercueil <pa...@cr...>
Date: Sun Aug 24 22:33:38 2025 +0200
dc-chain: docker: Install coreutils
The AICA toolchain needs the coreutils version of sha512sum to verify
the integrity of downloaded packages.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit c0e554920353b16b272f3aef2889040aacc6fb0e
Author: Paul Cercueil <pa...@cr...>
Date: Wed Aug 6 10:30:21 2025 +0200
docker: Rename 'dc_chain' argument to 'profile'
The name 'dc_chain' was not very descriptive, and also insinuates that
the Docker file is only for building Dreamcast toolchains.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit 8c1c79603c5be611f0cb83039b222a2389fda820
Author: Paul Cercueil <pa...@cr...>
Date: Wed Aug 6 00:23:25 2025 +0200
docker: Add "platform" argument
This will permit building Docker images of toolchains that target other
platforms than the Dreamcast.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit ed2fd5eec43b586c4217fce7f455d5807fe7b3e3
Author: Paul Cercueil <pa...@cr...>
Date: Wed Aug 6 00:20:49 2025 +0200
docker: Drop "makejobs" argument
dc-chain will already build in parallel, using a number of jobs that
corresponds to the number of CPU cores on the system.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit fd6e66dfa66a408afea03494735bd73eb490aa15
Author: Paul Cercueil <pa...@cr...>
Date: Fri May 30 19:31:32 2025 +0200
docker: Build KallistiOS from current tree
Rework the Docker script, so that it will use the current KOS tree
instead of downloading the master branch from the upstream repository.
This makes it possible to generate Docker images from different
repositories, different branches, or even with local changes.
Signed-off-by: Paul Cercueil <pa...@cr...>
commit e8d2f25ac887164ed55c452c31464e23a8d6919e
Author: Paul Cercueil <pa...@cr...>
Date: Fri May 30 01:35:24 2025 +0200
docker: Toolchain builds need bison
Add Bison to the list of dependencies.
Signed-off-by: Paul Cercueil <pa...@cr...>
-----------------------------------------------------------------------
Summary of changes:
.github/build-kos.sh | 8 ++++
.github/list-profiles.sh | 5 +++
.github/workflows/autobuild.yml | 93 ++++++++++++++++++++++++++++++++++++++++
utils/dc-chain/docker/Dockerfile | 20 +++++----
4 files changed, 118 insertions(+), 8 deletions(-)
create mode 100755 .github/build-kos.sh
create mode 100755 .github/list-profiles.sh
create mode 100644 .github/workflows/autobuild.yml
diff --git a/.github/build-kos.sh b/.github/build-kos.sh
new file mode 100755
index 00000000..f549fb82
--- /dev/null
+++ b/.github/build-kos.sh
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+cd /workspace
+
+cp doc/environ.sh.sample environ.sh
+sed -i "s/KOS_BASE=.*$/KOS_BASE=\\/workspace/" environ.sh
+. environ.sh
+make
diff --git a/.github/list-profiles.sh b/.github/list-profiles.sh
new file mode 100755
index 00000000..1cc2c675
--- /dev/null
+++ b/.github/list-profiles.sh
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+cd `dirname $0`/../utils/dc-chain/profiles
+
+ls -1 */*.mk |awk -F'/' '{gsub(/\.mk$/, "", $2); print "{\"platform\":\""$1"\",\"profile\":\""$2"\"}"}' | jq -R -s -c 'split("\n")[:-1]'
diff --git a/.github/workflows/autobuild.yml b/.github/workflows/autobuild.yml
new file mode 100644
index 00000000..c0d31726
--- /dev/null
+++ b/.github/workflows/autobuild.yml
@@ -0,0 +1,93 @@
+name: Linux build
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+env:
+ dockerhub_user: pcercuei
+
+jobs:
+ matrix:
+ if: github.repository == 'KallistiOS/KallistiOS'
+ runs-on: ubuntu-latest
+ outputs:
+ matrix: ${{ steps.setup-matrix.outputs.matrix }}
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - name: Setup matrix
+ id: setup-matrix
+ run: |
+ echo "matrix=$($GITHUB_WORKSPACE/.github/list-profiles.sh)" >> $GITHUB_OUTPUT
+
+ build:
+ needs: matrix
+ if: github.repository == 'KallistiOS/KallistiOS'
+ strategy:
+ fail-fast: false
+ matrix:
+ toolchain: ${{ fromJSON(needs.matrix.outputs.matrix) }}
+
+ runs-on: ubuntu-latest
+
+ env:
+ platform: ${{ fromJSON(matrix.toolchain).platform }}
+ profile: ${{ fromJSON(matrix.toolchain).profile }}
+
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: dorny/paths-filter@v3
+ id: filter
+ with:
+ filters: |
+ paths:
+ - .github/workflows/autobuild.yml
+ - .github/workflows/build-kos.sh
+ - .github/workflows/list-profiles.sh
+ - utils/dc-chain/**
+ - '!**/*.md'
+
+ - name: build-toolchain
+ if: steps.filter.outputs.paths == 'true'
+ run: >
+ sudo docker build
+ -t $dockerhub_user/$platform-toolchain:$profile
+ --build-arg platform=$platform
+ --build-arg profile=$profile
+ -f $GITHUB_WORKSPACE/utils/dc-chain/docker/Dockerfile
+ $GITHUB_WORKSPACE
+
+ - name: publish
+ if: steps.filter.outputs.paths == 'true' && github.event_name == 'push'
+ run: |
+ echo "${{ secrets.DOCKER_HUB_KEY }}" | sudo docker login -u $dockerhub_user --password-stdin
+ sudo docker push $dockerhub_user/$platform-toolchain:$profile
+ sudo docker logout
+
+ - name: build-kos-check
+ run: |
+ if [ -d $GITHUB_WORKSPACE/kernel/arch/$platform ] ; then
+ echo "BUILD_KOS=true" >> $GITHUB_ENV
+ else
+ echo "BUILD_KOS=false" >> $GITHUB_ENV
+ fi
+
+ - name: build-kos
+ if: env.BUILD_KOS == 'true'
+ run: >
+ # Login to Docker before building to get the usage limits of an authenticated user
+ echo "${{ secrets.DOCKER_HUB_KEY }}" | sudo docker login -u $dockerhub_user --password-stdin
+
+ sudo docker run --rm --name kallistios
+ -v $GITHUB_WORKSPACE:/workspace -w /workspace
+ $dockerhub_user/$platform-toolchain:$profile
+ .github/build-kos.sh $platform
+
+ sudo docker logout
diff --git a/utils/dc-chain/docker/Dockerfile b/utils/dc-chain/docker/Dockerfile
index 8081ce11..41c77291 100644
--- a/utils/dc-chain/docker/Dockerfile
+++ b/utils/dc-chain/docker/Dockerfile
@@ -3,8 +3,8 @@
#
# usage:
# - build one of the images:
-# docker build -t dcchain:stable --build-arg dc_chain=stable .
-# docker build -t dcchain:9.3.0-legacy --build-arg dc_chain=9.3.0-legacy --build-arg makejobs=4 .
+# docker build -t dcchain:stable --build-arg profile=stable -f ./Dockerfile $KOS_BASE
+# docker build -t dcchain:9.3.0-legacy --build-arg profile=9.3.0-legacy -f ./Dockerfile $KOS_BASE
# - create and run a container, e.g. for stable:
# docker run -it --name containername dcchain:stable /bin/bash
@@ -14,7 +14,9 @@ MAINTAINER KallistiOS <cad...@li...>
# Installing prerequisites
RUN apk --update add --no-cache \
+ bison \
build-base \
+ coreutils \
gmp-dev \
mpfr-dev \
mpc1-dev \
@@ -34,12 +36,14 @@ RUN apk --update add --no-cache \
# Making Sega Dreamcast toolchains
# You may adapt the KallistiOS repository URL if needed
-ARG dc_chain=stable
-ARG makejobs=2
-RUN mkdir -p /opt/toolchains/dc \
- && git clone https://git.code.sf.net/p/cadcdev/kallistios /opt/toolchains/dc/kos || git clone https://github.com/KallistiOS/KallistiOS.git /opt/toolchains/dc/kos \
- && cd /opt/toolchains/dc/kos/utils/dc-chain \
- && make build toolchain_profile=$dc_chain makejobs=$makejobs \
+ARG platform=dreamcast
+ARG profile=stable
+
+RUN mkdir -p /opt/toolchains/dc
+COPY . /opt/toolchains/dc/kos
+
+RUN cd /opt/toolchains/dc/kos/utils/dc-chain \
+ && make build platform=$platform toolchain_profile=$profile \
&& rm -rf /opt/toolchains/dc/kos
# Stage 2
hooks/post-receive
--
A pseudo Operating System for the Dreamcast.
|