Skip to content

Commit

Permalink
Test build
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubno committed Feb 6, 2024
1 parent 9aa4adc commit 401dc57
Show file tree
Hide file tree
Showing 6 changed files with 3,006 additions and 16 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/fc-kernels-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: FC Kernels

on:
push

permissions:
contents: read

jobs:
changes:
name: Repository changes
runs-on: ubuntu-22.04
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Setup Service Account
uses: google-github-actions/auth@v1
with:
workload_identity_provider: ${{ secrets.workload_identity_provider }}
service_account: ${{ secrets.service_account_email }}

- name: Build kernels
working-directory: ./packages/fc-kernels
run: make build

- name: Upload kernels
working-directory: ./packages/fc-kernels
run: make upload $project_id
env:
project_id: ${{ secrets.gcp_project_id }}
4 changes: 2 additions & 2 deletions packages/fc-kernels/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
ENV := $(shell cat ../../.last_used_env || echo "not-set")
-include ../../.env.${ENV}

client := gcloud compute instances list --format='csv(name)' --project $(GCP_PROJECT_ID) | grep "client"

build:
./build.sh
upload:
./upload.sh $(GCP_PROJECT_ID)
29 changes: 29 additions & 0 deletions packages/fc-kernels/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/bin/bash

set -euo pipefail

function build_version {
local version="$1"
stringarray=($version)
kernel_version=${stringarray[1]}
git checkout "$version"

cp ../configs/"${kernel_version}.config" .config
make vmlinux -j "$(nproc)"

mkdir -p "../builds/vmlinux-${kernel_version}"
cp vmlinux "../builds/vmlinux-${kernel_version}/vmlinux.bin"
}


git clone --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git linux

cd linux

grep -v '^ *#' < file | while IFS= read -r version
do
build_version "$version"
done

cd ..
rm -rf linux
Loading

0 comments on commit 401dc57

Please sign in to comment.