Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
152 commits
Select commit Hold shift + click to select a range
c7e89b3
change 6.7 to 6.13
lacraig2 Mar 10, 2025
62cb11d
add build options
lacraig2 Mar 10, 2025
779efca
add kernel configs
lacraig2 Mar 10, 2025
aa741b9
update dockerfile
lacraig2 Mar 10, 2025
c2a7626
add diffdefconfig
lacraig2 Apr 2, 2025
5a28b50
add new targets to build
lacraig2 Apr 2, 2025
2ee0b88
add new targets
lacraig2 Apr 2, 2025
6dfe6a2
update dockerfile
lacraig2 Apr 2, 2025
b8ba5bf
add working (for all except ppc)
lacraig2 Apr 2, 2025
418d695
drop riscv32
lacraig2 Apr 2, 2025
dfd99ac
bump 6.13
lacraig2 Apr 4, 2025
3895fb3
adjust build
lacraig2 Apr 4, 2025
3ee2bce
some config cleanup
lacraig2 Apr 14, 2025
62f5307
update kernel versions
lacraig2 Apr 14, 2025
a4be35e
more targets
lacraig2 Apr 14, 2025
47c066a
bypass config linting
lacraig2 Apr 14, 2025
da6bfb4
change kernelinfo-gdb
lacraig2 Apr 14, 2025
065c76e
temporarily revert kernel combination logic
lacraig2 Apr 14, 2025
60cf57b
update
lacraig2 Apr 18, 2025
3ebef27
update
lacraig2 Apr 18, 2025
f1a83c2
bump linux
lacraig2 Apr 22, 2025
dd8060a
bump linux
lacraig2 Apr 22, 2025
2ec586b
update 6.13
lacraig2 Apr 23, 2025
49e35f2
add ext4 and other common options
lacraig2 Apr 24, 2025
70ebd37
build: save and restore cache
lacraig2 Apr 24, 2025
77c52c5
build: use subprocess
lacraig2 Apr 24, 2025
412ae43
combine versions
lacraig2 Apr 29, 2025
bab73f8
add possibly irrelevant options
lacraig2 Apr 29, 2025
c3beee3
update 6.13
lacraig2 Apr 29, 2025
560265d
6.13: fixup configs
lacraig2 Apr 30, 2025
3d28436
update 6.13
lacraig2 Apr 30, 2025
b28b2ce
bump version
lacraig2 Apr 30, 2025
52b564b
make cache/restore cleaner
lacraig2 Apr 30, 2025
d0de428
update config option
lacraig2 Apr 30, 2025
843112c
bump 6.13
lacraig2 Apr 30, 2025
9d2a859
fixup cache
lacraig2 Apr 30, 2025
e5401bf
smaller build artifacts
lacraig2 Apr 30, 2025
d6fad8d
bump 6.13
lacraig2 May 1, 2025
de88cc6
update configs
lacraig2 May 1, 2025
87f47f0
bump linux
lacraig2 May 1, 2025
3a28360
bump
lacraig2 May 1, 2025
c5ae1fb
bump
lacraig2 May 1, 2025
f72077e
bump
lacraig2 May 1, 2025
0202524
bump linux
lacraig2 May 2, 2025
e492f5e
bump linux
lacraig2 May 3, 2025
1eb5747
bump linux
lacraig2 May 6, 2025
9ec862a
drop failing cache
lacraig2 May 6, 2025
40fa065
all-common: drop unused functionality
lacraig2 May 6, 2025
cd80bbf
config: drop powerpc ibm_cell_powerbutton
lacraig2 May 6, 2025
ed5e98a
bump linux
lacraig2 May 6, 2025
68350c4
_in_container_build.sh: add includes
lacraig2 May 11, 2025
4bce950
bump 6.13
lacraig2 May 12, 2025
d994bfe
bump linux
lacraig2 May 12, 2025
b74ff6e
bump linux
lacraig2 May 13, 2025
28a799d
bump linux
lacraig2 May 14, 2025
e233752
bump
lacraig2 May 14, 2025
88af1fa
add uprobes to config
lacraig2 May 16, 2025
c1422ab
bump
lacraig2 May 16, 2025
cd15bb8
bump linux
lacraig2 May 16, 2025
9297f7e
no need for virtualization
lacraig2 May 18, 2025
09a719a
drop kuap on powerpc and arm_pan on arm
lacraig2 May 18, 2025
622833e
bump linux
lacraig2 May 19, 2025
c66bb00
bump linux
lacraig2 May 19, 2025
b6b62a2
more config options needed by some rehostings (#42)
zestrada May 19, 2025
23f1003
attempt at generating a docker image
zestrada May 16, 2025
15255b1
cache pandare/kernel_builder to avoid hitting rate limits
zestrada May 16, 2025
7b80c5e
fixup ref
zestrada May 16, 2025
d33e6da
try to build a linux_builder container first, extract artifacts to /l…
zestrada May 16, 2025
62d4aef
try to leverage container we just built
zestrada May 16, 2025
1ae4f74
set up /app so absolute paths work
zestrada May 16, 2025
2ea0788
used wrong name for artifact container base
zestrada May 17, 2025
838ce00
no longer unpack kernel build artifacts
zestrada May 17, 2025
412e777
trying xz to see if that buys enough headroom
zestrada May 17, 2025
1646da8
last try for artifacts: "xz -9"
zestrada May 17, 2025
167748d
giving up on artifacts for container
zestrada May 18, 2025
98db034
actually copy out build
zestrada May 18, 2025
64d2806
also build on dev_6.13
lacraig2 May 19, 2025
34382dd
always push latest tag
lacraig2 May 21, 2025
7558a17
bump linux
lacraig2 May 21, 2025
f1e3d87
bump linux
lacraig2 May 21, 2025
c93392c
bump linux
lacraig2 May 21, 2025
a8b48ce
bump linux
lacraig2 May 21, 2025
b24bf88
bump linux
lacraig2 May 21, 2025
67c6946
bump linux for deadlock fix
zestrada May 23, 2025
2bbd032
serialized portal requests
zestrada May 23, 2025
9c607ae
bump linux
lacraig2 Jun 4, 2025
1819678
bump version
lacraig2 Jun 16, 2025
640a0f1
bump linux
lacraig2 Jun 18, 2025
25bcedd
bump linux
lacraig2 Jun 18, 2025
900ee9a
bump linux
lacraig2 Jun 20, 2025
a506c66
bump
lacraig2 Jun 21, 2025
249416b
_in_container_build: create minimal kernel-devel archive
lacraig2 Jul 2, 2025
f53d6e7
add kernel-devel artifacts
lacraig2 Jul 2, 2025
b8dc4a8
optimize dockerfile
lacraig2 Jul 3, 2025
1aaa95f
update build.sh
lacraig2 Jul 3, 2025
68262ff
config_module_test=y
lacraig2 Jul 3, 2025
0390dae
bump linux
lacraig2 Jul 3, 2025
faa9050
bump workflow
lacraig2 Jul 3, 2025
64bc6f9
add logging
lacraig2 Jul 3, 2025
07e9dd0
build: get the right ref
lacraig2 Jul 3, 2025
3429b26
bump linux
lacraig2 Jul 3, 2025
413e863
builder: drop broken logging
lacraig2 Jul 3, 2025
8ad4120
bump linux version
lacraig2 Jul 24, 2025
bea6708
bump linux
lacraig2 Jul 24, 2025
3153c9a
builder: use local registry
lacraig2 Jul 24, 2025
866af50
simplify
lacraig2 Jul 24, 2025
94974e5
bump
lacraig2 Jul 24, 2025
395c9d0
use buildx for kernel_builder
lacraig2 Jul 24, 2025
a988673
drop file build
lacraig2 Jul 24, 2025
2706ef1
fixup
lacraig2 Jul 24, 2025
edb3e27
dockerfile: use registry
lacraig2 Jul 24, 2025
9ba97c2
build from registry in second stage
lacraig2 Jul 24, 2025
177f1e6
modify
lacraig2 Jul 24, 2025
2221d5b
build: log in
lacraig2 Jul 24, 2025
0a9abbe
bump linuix
lacraig2 Jul 28, 2025
dc58df0
use oras
lacraig2 Jul 28, 2025
e696aeb
update reference format
lacraig2 Jul 29, 2025
a8de34c
fetch certs before pulling
lacraig2 Jul 29, 2025
fafa032
cache has to be per arch/version
lacraig2 Jul 29, 2025
c063f4e
build.yml: adjust oras
lacraig2 Jul 29, 2025
f2d3c0b
aggregate: log into rehosting arc
lacraig2 Jul 29, 2025
bc48fb2
drop upload build-revisions (unused)
lacraig2 Jul 29, 2025
1625e70
build: use pigz
lacraig2 Jul 29, 2025
3b44cc5
add clear cache job
lacraig2 Jul 29, 2025
9300e7e
fixing and debugging cache
lacraig2 Jul 29, 2025
14690b3
debug logging
lacraig2 Jul 29, 2025
b88892f
missing quote
lacraig2 Jul 29, 2025
40b3f31
overwriting values
lacraig2 Jul 29, 2025
798d72b
exclude devel in kernels-latest.tar.gz
lacraig2 Jul 29, 2025
93b1b12
fix renaming
lacraig2 Jul 29, 2025
049211e
drop caching
lacraig2 Jul 31, 2025
0af5e90
bump linux
lacraig2 Jul 31, 2025
df23976
bump linux
lacraig2 Jul 31, 2025
5b777b3
fixup
lacraig2 Jul 31, 2025
8d6deb7
bump linux
lacraig2 Aug 1, 2025
5b450d4
simplify
lacraig2 Aug 1, 2025
5e29a54
clean up build process
lacraig2 Aug 4, 2025
c1b62ac
add missing options
lacraig2 Aug 11, 2025
b2f4d1d
bump build:
lacraig2 Aug 11, 2025
5ec0f7b
_in_container_build: copy per-architecture kernels
lacraig2 Sep 19, 2025
7f2befb
all-config: add hvc_console and related options
lacraig2 Sep 19, 2025
4e336f2
build.yml: add back powerpc targets
lacraig2 Sep 22, 2025
00b2974
4.10 config options add
lacraig2 Sep 22, 2025
46150a1
build.yml: add 4.10
lacraig2 Sep 22, 2025
5de83a7
4.10: add powerpc
lacraig2 Sep 22, 2025
5d602f4
bump kernels
lacraig2 Sep 22, 2025
48cab80
_in_container_build: allow skipping non-existent targets
lacraig2 Sep 22, 2025
cdfaa57
_in_container_build: optimization don't pass boot (might break things)
lacraig2 Sep 22, 2025
8ba8005
build.yml: rewrite to make it determine things by itself
lacraig2 Sep 22, 2025
2ecbabe
build.yml: cleaner separator
lacraig2 Sep 22, 2025
912ae97
build.yml: experiment fast ci
lacraig2 Sep 22, 2025
462f099
build.yml: syntax
lacraig2 Sep 22, 2025
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
305 changes: 255 additions & 50 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,96 +12,301 @@ on:
workflow_dispatch:

jobs:
prebuild:
runs-on: rehosting-arc
outputs:
matrix: ${{ steps.find_targets.outputs.matrix }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ github.ref }}

- name: Trust Harbor's self-signed certificate
run: |
echo "Fetching certificate from ${{ secrets.REHOSTING_ARC_REGISTRY }}"
openssl s_client -showcerts -connect ${{ secrets.REHOSTING_ARC_REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null
sudo update-ca-certificates

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver-opts: |
image=moby/buildkit:master
network=host
buildkitd-config-inline: |
[registry."${{ secrets.REHOSTING_ARC_REGISTRY }}"]
insecure = true
http = true

- name: Log git revisions of all linux projects
run: |
echo "Main repo revision:" && git rev-parse HEAD
echo
echo "Submodule revisions:" && git submodule status
echo
echo "Full submodule SHAs:" && git submodule foreach 'echo $name: $(git rev-parse HEAD)'

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: rehosting
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Log in to Rehosting Arc Registry
uses: docker/login-action@v3
with:
registry: ${{secrets.REHOSTING_ARC_REGISTRY}}
username: ${{ secrets.REHOSTING_ARC_REGISTRY_USER }}
password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD }}

# Build this first, build.sh will use it later
- name: Build kernel_builder docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
${{secrets.REHOSTING_ARC_REGISTRY}}/pandare/kernel_builder:${{ github.ref_name }}
${{secrets.REHOSTING_ARC_REGISTRY}}/pandare/kernel_builder:latest
build-args: |
REGISTRY=${{ secrets.REHOSTING_ARC_REGISTRY }}/proxy
cache-from: |
type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/pandare/kernel_builder:cache,mode=max
type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/pandare/kernel_builderr:cache-PR-${{github.event.number}},mode=max
cache-to: |
type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/pandare/kernel_builder:cache,mode=max
type=registry,ref=${{secrets.REHOSTING_ARC_REGISTRY}}/pandare/kernel_builder:cache-PR-${{ github.event.number }}

- name: Setup shared Linux kernel sources
run: |
set -eux
BASE_REPO_DIR="/home/runner/_shared/linux"
BASE_REPO_URL="https://github.com/rehosting/linux"
# Clone bare base repo if missing
if [ ! -d "$BASE_REPO_DIR" ]; then
echo "Cloning bare base repo to $BASE_REPO_DIR"
git clone --bare "$BASE_REPO_URL" "$BASE_REPO_DIR"
fi
# Always fetch latest from upstream
git --git-dir="$BASE_REPO_DIR" fetch --all

# Find all needed kernel versions from configs
needed_versions=()
for version_dir in configs/*/; do
version=$(basename "$version_dir")
needed_versions+=("$version")
done

# For each needed version, create a unique per-run clone and checkout correct revision
for version in "${needed_versions[@]}"; do
CLONE_DIR="/home/runner/_shared/linux-$version-$GITHUB_RUN_ID"
if [ ! -d "$CLONE_DIR" ]; then
echo "Cloning $version to $CLONE_DIR"
git clone --reference "$BASE_REPO_DIR" "$BASE_REPO_DIR" "$CLONE_DIR"
fi

# Get submodule path and revision from .gitmodules and ls-tree
SUBMODULE_PATH="linux/$version"
SUBMODULE_REV=$(git ls-tree HEAD "$SUBMODULE_PATH" | awk '{print $3}')
if [ -z "$SUBMODULE_REV" ]; then
echo "No submodule revision found for $SUBMODULE_PATH"
continue
fi

# Checkout the correct revision
cd "$CLONE_DIR"
git fetch --all
git checkout "$SUBMODULE_REV"
cd -
done

echo "Available kernel clones:"
ls -la /home/runner/_shared/

- name: Find valid target/version combinations
id: find_targets
run: |
COMBINATIONS=()
for version_dir in configs/*/; do
version=$(basename "$version_dir")
for config_file in "$version_dir"*; do
if [[ -f "$config_file" && ! "$config_file" =~ \.inc$ ]]; then
target=$(basename "$config_file")
COMBINATIONS+=("\"${target}@${version}\"")
fi
done
done
MATRIX=$(IFS=,; echo "[${COMBINATIONS[*]}]")
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
echo "Found valid combinations: $MATRIX"

build:
# Only publish on tags. run git tag vX and git push origin vX
# runs-on: self-hosted
runs-on: ubuntu-latest
needs: prebuild
runs-on: rehosting-arc
if: github.event.pull_request.draft == false


strategy:
matrix:
target: [armel, arm64, mipsel, mipseb, mips64el, mips64eb, x86_64]
version: ["4.10"] # XXX: quotes are necessary, otherwise 4.10 -> 4.1
target_version: ${{ fromJSON(needs.prebuild.outputs.matrix) }}

steps:
- uses: actions/checkout@v4 # Clones to $GITHUB_WORKSPACE
- uses: actions/checkout@v4
with:
fetch-depth: 0
#submodules: 'true'
ref: ${{ github.ref }}

# Instead of getting submodules with checkout, we can do it manually to control depth.
# We don't want a full Linux history
- name: Pull kernel source
run: git submodule update --init --depth 1
- name: Extract target and version
id: extract
run: |
TARGET_VERSION="${{ matrix.target_version }}"
TARGET="${TARGET_VERSION%@*}"
VERSION="${TARGET_VERSION#*@}"
echo "target=$TARGET" >> $GITHUB_OUTPUT
echo "version=$VERSION" >> $GITHUB_OUTPUT
echo "Building target: $TARGET, version: $VERSION"

- name: Cache kernel build objects
uses: actions/cache@v4
with:
path: |
cache
key: ${{ runner.os }}-kernel-build-${{ matrix.kernel_version }}-${{ matrix.target }}-${{ hashFiles('**/Dockerfile', '**/*.sh') }}
restore-keys: |
${{ runner.os }}-kernel-build-${{ matrix.kernel_version }}-${{ matrix.target }}-
${{ runner.os }}-kernel-build-${{ matrix.kernel_version }}-
${{ runner.os }}-kernel-build-

- name: Lint configs
run: ./build.sh --targets ${{ matrix.target }} --versions ${{ matrix.version }} --config-only

- name: Build Kernel for ${{ matrix.target }}
run: ./build.sh --targets ${{ matrix.target }} --versions ${{ matrix.version }}

# Temporarily store each target's build output
- name: Save ${{ matrix.target }} ${{ matrix.version }} build output
uses: actions/upload-artifact@v4
- name: Trust Harbor's self-signed certificate
run: |
echo "Fetching certificate from ${{ secrets.REHOSTING_ARC_REGISTRY }}"
openssl s_client -showcerts -connect ${{ secrets.REHOSTING_ARC_REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null
sudo update-ca-certificates

- name: Log in to Rehosting Arc Registry
uses: docker/login-action@v3
with:
name: build-output-${{ matrix.target }}.${{ matrix.version }}
path: kernels-latest.tar.gz
registry: ${{secrets.REHOSTING_ARC_REGISTRY}}
username: ${{ secrets.REHOSTING_ARC_REGISTRY_USER }}
password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD }}

- name: Pull prebuilt image
run: |
docker pull ${{ secrets.REHOSTING_ARC_REGISTRY }}/rehosting/linux_builder:${{ github.ref_name }}
docker tag ${{ secrets.REHOSTING_ARC_REGISTRY }}/rehosting/linux_builder:${{ github.ref_name }} rehosting/linux_builder:${{ github.ref_name }}

- uses: oras-project/setup-oras@v1.2.3

- name: Install pigz for parallel compression
run: |
sudo apt-get update && sudo apt-get install -y pigz

- name: Build Kernel for ${{ steps.extract.outputs.target }}
run: |
set -eux
VERSION="${{ steps.extract.outputs.version }}"
CLONE_DIR="/home/runner/_shared/linux-$VERSION-$GITHUB_RUN_ID"
if [ ! -d "$CLONE_DIR" ]; then
echo "Kernel clone $CLONE_DIR not found!"
exit 1
fi

mkdir -p cache
docker run --rm \
-v $PWD/cache:/tmp/build \
-v $PWD/configs:/app/configs:ro \
-v $PWD/_in_container_build.sh:/app/_in_container_build.sh:ro \
-v $CLONE_DIR:/app/linux/${VERSION}:ro \
${{ secrets.REHOSTING_ARC_REGISTRY }}/pandare/kernel_builder:${{ github.ref_name }} \
bash -c "./_in_container_build.sh false ${VERSION} ${{ steps.extract.outputs.target }} false false false true && cp kernels-latest.tar.gz /tmp/build/kernels-latest.tar.gz && cp /app/kernel-devel-all.tar.gz /tmp/build/kernel-devel-all.tar.gz"
mv cache/kernels-latest.tar.gz kernels-latest.tar.gz
mv cache/kernel-devel-all.tar.gz kernel-devel-all.tar.gz
tar -cf - kernels-latest.tar.gz kernel-devel-all.tar.gz | pigz -p $(nproc) > build-output-${{ steps.extract.outputs.target }}.${VERSION}.tar.gz

- name: Push build artifact to registry with oras
run: |
oras push ${{ secrets.REHOSTING_ARC_REGISTRY }}/rehosting/linux_builder_artifact:${{ steps.extract.outputs.target }}-${{ steps.extract.outputs.version }} build-output-${{ steps.extract.outputs.target }}.${{ steps.extract.outputs.version }}.tar.gz:application/gzip

aggregate:
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
needs: build
runs-on: ubuntu-latest
runs-on: rehosting-arc
env:
MATRIX_VERSIONS: ${{ toJSON(needs.build.strategy.matrix.version) }}
permissions:
actions: write
contents: write
steps:
- name: Download all build artifacts
uses: actions/download-artifact@v4
- name: Trust Harbor's self-signed certificate
run: |
echo "Fetching certificate from ${{ secrets.REHOSTING_ARC_REGISTRY }}"
openssl s_client -showcerts -connect ${{ secrets.REHOSTING_ARC_REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null
sudo update-ca-certificates

- name: Log in to Rehosting Arc Registry
uses: docker/login-action@v3
with:
path: downloaded-kernels
registry: ${{secrets.REHOSTING_ARC_REGISTRY}}
username: ${{ secrets.REHOSTING_ARC_REGISTRY_USER }}
password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD }}
- uses: oras-project/setup-oras@v1.2.3

- name: Pull all build artifacts from registry with oras
run: |
mkdir -p downloaded-kernels
for target in armel arm64 mipsel mipseb mips64el mips64eb powerpc powerpc64 loongarch64 riscv64 x86_64; do
for version in 6.13; do
tag="$target-$version"
oras pull ${{ secrets.REHOSTING_ARC_REGISTRY }}/rehosting/linux_builder_artifact:$tag -o downloaded-kernels || echo "No artifact for $tag"
done
done
echo "[DEBUG] Downloaded build artifacts:"
ls -lh downloaded-kernels

- name: Extract all build outputs
run: |
rm -rf extracted-kernels && mkdir extracted-kernels
for archive in $(find downloaded-kernels -name "build-output-*.tar.gz"); do
archver=$(basename "$archive" | sed 's/build-output-\(.*\)\.tar\.gz/\1/')
mkdir -p extracted-kernels/$archver
echo "[DEBUG] Extracting $archive to extracted-kernels/$archver"
tar -xzf "$archive" -C extracted-kernels/$archver
done
echo "[DEBUG] Extracted build outputs:"
find extracted-kernels

- name: Combine all kernels into a single archive
run: |
rm -rf combined-kernels && mkdir combined-kernels
# Extract each kernels-latest.tar.gz archive
for archive in $(find downloaded-kernels -name "*.tar.gz"); do
echo "[DEBUG] Found kernels-latest.tar.gz files:"
find extracted-kernels -name "kernels-latest.tar.gz"
# Recursively extract all kernels-latest.tar.gz archives for all architectures/versions
find extracted-kernels -name "kernels-latest.tar.gz" | while read archive; do
echo "[DEBUG] Extracting $archive into combined-kernels"
tar -xzf "$archive" -C combined-kernels
done
echo "[DEBUG] Contents of combined-kernels after extraction:"
find combined-kernels

# Combine OSI profiles for each kernel version
# otherwise the extracted kernel configs willc lobber each other
# otherwise the extracted kernel configs will clobber each other
if [ -d combined-kernels/kernels/4.10 ] ; then
for archive in $(find downloaded-kernels -name "*.tar.gz"); do
find extracted-kernels -name "kernels-latest.tar.gz" | while read archive; do
tar -O -xf "$archive" "kernels/4.10/osi.config";
done > combined-kernels/kernels/4.10/osi.config
fi

if [ -d combined-kernels/kernels/6.7 ] ; then
for archive in $(find downloaded-kernels -name "*.tar.gz"); do
tar -O -xf "$archive" "kernels/6.7/osi.config";
done > combined-kernels/kernels/6.7/osi.config
if [ -d combined-kernels/kernels/6.13 ] ; then
find extracted-kernels -name "kernels-latest.tar.gz" | while read archive; do
tar -O -xf "$archive" "kernels/6.13/osi.config";
done > combined-kernels/kernels/6.13/osi.config
fi



# Create a new single archive from the combined content
tar -czvf kernels-latest.tar.gz -C combined-kernels .

- name: Aggregate all kernel-devel artifacts
run: |
mkdir -p kernel-devel-all
for archive in $(find extracted-kernels -name "kernel-devel-all.tar.gz"); do
tar -xzf "$archive" -C kernel-devel-all
done
tar -czvf kernel-devel-all.tar.gz -C kernel-devel-all .

- name: Create and publish release
uses: softprops/action-gh-release@v1
with:
files: kernels-latest.tar.gz
files: |
kernels-latest.tar.gz
kernel-devel-all.tar.gz
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
tag_name: ${{ github.ref_name }}
30 changes: 30 additions & 0 deletions .github/workflows/clear_cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Clear kernel cache

on:
workflow_dispatch:

jobs:
clear-cache:
runs-on: rehosting-arc
steps:
- name: Trust Harbor's self-signed certificate
run: |
echo "Fetching certificate from ${{ secrets.REHOSTING_ARC_REGISTRY }}"
openssl s_client -showcerts -connect ${{ secrets.REHOSTING_ARC_REGISTRY }}:443 < /dev/null 2>/dev/null | openssl x509 -outform PEM | sudo tee /usr/local/share/ca-certificates/harbor.crt > /dev/null
sudo update-ca-certificates
- uses: oras-project/setup-oras@v1.2.3
- name: Log in to Rehosting Arc Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.REHOSTING_ARC_REGISTRY }}
username: ${{ secrets.REHOSTING_ARC_REGISTRY_USER }}
password: ${{ secrets.REHOSTING_ARC_REGISTRY_PASSWORD }}
- name: Delete all kernel cache images
run: |
set -e
repo="${{ secrets.REHOSTING_ARC_REGISTRY }}/rehosting/linux_builder_cache"
tags=$(oras repo tags $repo)
for tag in $tags; do
echo "Deleting $repo:$tag"
oras repo rm $repo:$tag || echo "Failed to delete $repo:$tag"
done
2 changes: 1 addition & 1 deletion .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
url = https://github.com/rehosting/linux.git
branch = main_4.10
[submodule "linux_6.7"]
path = linux/6.7
path = linux/6.13
url = https://github.com/rehosting/linux.git
branch = main_6.7
Loading
Loading