Skip to content

Commit f0969ba

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

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

.github/workflows/compare.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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+
export \$_ksrc="pkg/src/\$_basename-\$pkgver"
48+
popd &&
49+
pushd repo &&
50+
./scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} \$_ksrc &&
51+
popd &&
52+
cp \$_ksrc/.config config-new
53+
pushd repo-old &&
54+
./scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} \$_ksrc &&
55+
popd &&
56+
cp \$_ksrc/.config config-old
57+
diff -urN config-old config-new > config.diff
58+
"
59+
- uses: actions/upload-artifact@v4
60+
with:
61+
name: diff-${{ matrix.arch }}
62+
path: config.diff

0 commit comments

Comments
 (0)