Skip to content

Commit 2f04eae

Browse files
committed
add workflow to compare config
1 parent 09a0aa9 commit 2f04eae

2 files changed

Lines changed: 60 additions & 1 deletion

File tree

.github/workflows/compare.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Compare Kernel Config
2+
3+
on:
4+
pull_request:
5+
types: [opened, reopened, synchronize]
6+
branches:
7+
- 'master'
8+
9+
jobs:
10+
genconfig:
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
include:
15+
- arch: x86_64
16+
karch: x86
17+
- arch: aarch64
18+
karch: arm64
19+
- arch: riscv64
20+
karch: riscv
21+
- arch: loongarch64
22+
karch: loongarch
23+
runs-on: ubuntu-latest
24+
steps:
25+
- uses: actions/checkout@v4
26+
with:
27+
path: repo
28+
- uses: actions/checkout@v4
29+
with:
30+
ref: master
31+
path: repo-old
32+
- uses: actions/checkout@v4
33+
with:
34+
repository: eweOS/packages
35+
ref: linux
36+
path: pkg
37+
- run: >-
38+
docker run
39+
--rm
40+
-v $(pwd):/${{ github.workspace }}
41+
-w ${{ github.workspace }}
42+
ghcr.io/eweos/docker:buildenv
43+
bash -c "
44+
pushd pkg &&
45+
pacman -Syu --noconfirm && makepkg -os --noconfirm --noprepare &&
46+
source PKGBUILD &&
47+
popd &&
48+
repo/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} pkg/src/\$_basename-\$pkgver &&
49+
cp pkg/src/\$_basename-\$pkgver/.config config-new &&
50+
repo-old/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} pkg/src/\$_basename-\$pkgver &&
51+
cp pkg/src/\$_basename-\$pkgver/.config config-old &&
52+
diff -urN config-old config-new > config.diff
53+
"
54+
- uses: actions/upload-artifact@v4
55+
with:
56+
name: diff-${{ matrix.arch }}
57+
path: config.diff

scripts/generate-config.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,10 @@ for _conf in "$config_path"/*.config "$config_path/$carch"/*.config; do
2121
cat "$_conf" >> "$mergedconfig"
2222
done
2323

24-
cd "$ksrc"
24+
pushd "$ksrc"
2525

2626
make LLVM=1 LLVM_IAS=1 ARCH="$karch" defconfig
2727
scripts/kconfig/merge_config.sh -m .config "$mergedconfig"
2828
make LLVM=1 LLVM_IAS=1 ARCH="$karch" olddefconfig
29+
30+
popd

0 commit comments

Comments
 (0)