Skip to content

Commit

Permalink
chore: move to using kres
Browse files Browse the repository at this point in the history
Kresify the project.

Signed-off-by: Noel Georgi <[email protected]>
  • Loading branch information
frezbo committed Nov 2, 2023
1 parent d7509f1 commit 5f84302
Show file tree
Hide file tree
Showing 12 changed files with 432 additions and 121 deletions.
5 changes: 5 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-02T09:50:52Z by kres 3a2980e-dirty.

*
!README.md
!pkg.yaml
48 changes: 34 additions & 14 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-02T16:03:57Z by kres 32170a7-dirty.

name: default
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
on:
"on":
push:
branches:
- main
Expand All @@ -15,20 +19,23 @@ on:
- release-*
jobs:
default:
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/'))
permissions:
actions: read
contents: write
packages: write
pull-requests: read
runs-on:
- self-hosted
- pkgs
if: (!startsWith(github.head_ref, 'renovate/') && !startsWith(github.head_ref, 'dependabot/'))
outputs:
labels: ${{ steps.workflow-run-info.outputs.pullRequestLabels }}
services:
buildkitd:
image: moby/buildkit:buildx-stable-1
image: moby/buildkit:v0.12.2
options: --privileged
ports:
- 1234:1234
options: --privileged
volumes:
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
Expand All @@ -41,15 +48,15 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
append: |
- endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234
platforms: linux/arm64
- name: build
driver: remote
endpoint: tcp://localhost:1234
- name: Build
run: |
make
- name: build nonfree
- name: Build nonfree
run: |
make nonfree
- name: Login to registry
Expand All @@ -62,13 +69,26 @@ jobs:
- name: Push to registry
if: github.event_name != 'pull_request'
run: |
make PUSH=true
make PUSH=true
- name: Push nonfree
if: github.event_name != 'pull_request'
run: |
make nonfree PUSH=true
- name: Retrieve workflow info
id: workflow-run-info
uses: potiuk/get-workflow-origin@v1_5
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: release-notes
if: startsWith(github.ref, 'refs/tags/')
run: |
make release-notes
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: crazy-max/ghaction-github-release@v2
with:
body_path: _out/RELEASE_NOTES.md
draft: "true"
reproducibility:
runs-on:
- self-hosted
Expand All @@ -78,10 +98,10 @@ jobs:
- default
services:
buildkitd:
image: moby/buildkit:buildx-stable-1
image: moby/buildkit:v0.12.2
options: --privileged
ports:
- 1234:1234
options: --privileged
volumes:
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
Expand All @@ -94,11 +114,11 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: remote
endpoint: tcp://localhost:1234
append: |
- endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234
platforms: linux/arm64
- name: reproducibility
driver: remote
endpoint: tcp://localhost:1234
- name: reproducibility-test
run: |
make reproducibility-test
7 changes: 6 additions & 1 deletion .github/workflows/slack-notify.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-02T09:53:23Z by kres 3a2980e-dirty.

name: slack-notify
"on":
workflow_run:
Expand All @@ -10,6 +14,7 @@ jobs:
slack-notify:
runs-on:
- self-hosted
- generic
if: ${{ github.event.workflow_run.conclusion != 'skipped' }}
steps:
- name: Retrieve Workflow Run Info
Expand All @@ -34,7 +39,7 @@ jobs:
"fields": [
{
"type": "mrkdwn",
"text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.retrieve-workflow-run-info.outputs.pullRequestNumber, github.event.workflow_run.display_title) || format('*Build:* {0}#{1} (`{2}`)', github.repository, github.sha, github.ref_name) }}"
"text": "${{ github.event.workflow_run.event == 'pull_request' && format('*Pull Request:* {0} (`{1}`)\n<{2}/pull/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, steps.retrieve-workflow-run-info.outputs.pullRequestNumber, github.event.workflow_run.display_title) || format('*Build:* {0} (`{1}`)\n<{2}/commit/{3}|{4}>', github.repository, github.ref_name, github.event.repository.html_url, github.sha, github.event.workflow_run.display_title) }}"
},
{
"type": "mrkdwn",
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/weekly.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-02T09:53:23Z by kres 3a2980e-dirty.

name: weekly
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: true
"on":
schedule:
- cron: 30 1 * * 1
jobs:
reproducibility:
runs-on:
- self-hosted
- pkgs
services:
buildkitd:
image: moby/buildkit:v0.12.2
options: --privileged
ports:
- 1234:1234
volumes:
- /var/lib/buildkit/${{ github.repository }}:/var/lib/buildkit
- /usr/etc/buildkit/buildkitd.toml:/etc/buildkit/buildkitd.toml
steps:
- name: checkout
uses: actions/checkout@v4
- name: Unshallow
run: |
git fetch --prune --unshallow
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
append: |
- endpoint: tcp://buildkit-arm64.ci.svc.cluster.local:1234
platforms: linux/arm64
driver: remote
endpoint: tcp://localhost:1234
- name: reproducibility-test
run: |
make reproducibility-test
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
_out*
# THIS FILE WAS AUTOMATICALLY GENERATED, PLEASE DO NOT EDIT.
#
# Generated on 2023-11-02T09:50:52Z by kres 3a2980e-dirty.

_out
80 changes: 80 additions & 0 deletions .kres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
---
kind: pkgfile.Build
spec:
targets:
# - non-related to the kernel, in alphabetical order
- base
- ca-certificates
- cni
- containerd
- cryptsetup
- dosfstools
- eudev
- fhs
- flannel-cni
- grub
- ipmitool
- iptables
- ipxe
- kmod
- libaio
- libinih
- libjson-c
- liblzma
- libpopt
- libseccomp
- liburcu
- linux-firmware
- lvm2
- musl
- openssl
- raspberrypi-firmware
- runc
- sd-boot
- socat
- syslinux
- u-boot
- util-linux
- xfsprogs
# - kernel & dependent packages (out of tree kernel modules)
# kernel first, then packages in alphabetical order
- kernel
- drbd-pkg
- gasket-driver-pkg
- nvidia-open-gpu-kernel-modules-pkg
- zfs-pkg
additionalTargets:
nonfree:
- nonfree-kmod-nvidia-pkg
reproducibleTargetName: reproducibility
---
kind: auto.CustomSteps
spec:
steps:
- name: kernel-olddefconfig
toplevel: true
- name: kernel-%
toplevel: true
---
kind: custom.Step
name: kernel-olddefconfig
spec:
makefile:
enabled: true
script:
- |
@$(MAKE) local-kernel-build TARGET_ARGS="--build-arg=KERNEL_TARGET=olddefconfig" PLATFORM=linux/amd64 DEST="kernel/build"
@$(MAKE) local-kernel-build TARGET_ARGS="--build-arg=KERNEL_TARGET=olddefconfig" PLATFORM=linux/arm64 DEST="kernel/build"
---
kind: custom.Step
name: kernel-%
spec:
makefile:
enabled: true
script:
- |
for platform in linux/amd64 linux/arm64; do \
arch=`basename $$platform` ; \
$(MAKE) docker-kernel-prepare PLATFORM=$$platform TARGET_ARGS="--tag=$(REGISTRY)/$(USERNAME)/kernel:$(TAG)-$$arch --load"; \
docker run --rm -it --entrypoint=/toolchain/bin/bash -e PATH=/toolchain/bin:/bin -w /src -v $$PWD/kernel/build/config-$$arch:/host/.hostconfig $(REGISTRY)/$(USERNAME)/kernel:$(TAG)-$$arch -c 'cp /host/.hostconfig .config && make $* && cp .config /host/.hostconfig'; \
done
Loading

0 comments on commit 5f84302

Please sign in to comment.