Skip to content

Commit ef56437

Browse files
committed
test
1 parent 8f27058 commit ef56437

File tree

3 files changed

+65
-17
lines changed

3 files changed

+65
-17
lines changed

.github/workflows/compare.yml

Lines changed: 61 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: Compare Kernel Config
22

33
on:
44
pull_request:
5+
types: [opened, reopened, synchronize]
6+
branches:
7+
- 'master'
58

69
jobs:
7-
bump:
10+
genconfig:
811
strategy:
912
fail-fast: false
1013
matrix:
@@ -32,21 +35,64 @@ jobs:
3235
ref: linux
3336
path: pkg
3437
- run: >-
35-
docker run --rm
36-
-v ./pkg:/pkg -w /pkg
37-
ghcr.io/eweos/docker:master
38-
makepkg -o
39-
- run: |
40-
. pkg/PKGBUILD
41-
./repo/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} pkg/$_basename-$pkgver repo
42-
cp pkg/$_basename-$pkgver/.config config-new
43-
- run: |
44-
. pkg/PKGBUILD
45-
./repo/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} pkg/$_basename-$pkgver repo-old
46-
cp pkg/$_basename-$pkgver/.config config-old
47-
- run: |
48-
diff -urN config-old config-new > config.diff
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 &&
46+
kdir=pkg/src/\$(source PKGBUILD && echo \$_basename-\$pkgver) &&
47+
popd &&
48+
repo/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} \$kdir &&
49+
cp \$kdir/.config config-new &&
50+
repo-old/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} \$kdir &&
51+
cp \$kdir/.config config-old &&
52+
diff -urN config-old config-new > config.diff || true
53+
"
4954
- uses: actions/upload-artifact@v4
5055
with:
5156
name: diff-${{ matrix.arch }}
5257
path: config.diff
58+
59+
compare:
60+
runs-on: ubuntu-latest
61+
needs: [genconfig]
62+
steps:
63+
- uses: peter-evans/find-comment@v3
64+
id: fc
65+
with:
66+
issue-number: ${{ github.event.pull_request.number }}
67+
comment-author: 'github-actions[bot]'
68+
body-includes: Config Compare
69+
- uses: actions/download-artifact@v4
70+
with:
71+
name: diff-x86_64
72+
path: diff-x86_64
73+
- uses: actions/download-artifact@v4
74+
with:
75+
name: diff-aarch64
76+
path: diff-aarch64
77+
- uses: actions/download-artifact@v4
78+
with:
79+
name: diff-riscv64
80+
path: diff-riscv64
81+
- uses: actions/download-artifact@v4
82+
with:
83+
name: diff-loongarch64
84+
path: diff-loongarch64
85+
- run: >-
86+
echo "Config Compare" >> diff.output &&
87+
for outarch in x86_64 aarch64 riscv64 loongarch64; do
88+
(echo '```' >> diff.output &&
89+
echo "# $outarch" >> diff.output &&
90+
cat diff-$outarch/config.diff >> diff.output &&
91+
echo '```' >> diff.output);
92+
done
93+
- uses: peter-evans/create-or-update-comment@v4
94+
with:
95+
comment-id: ${{ steps.fc.outputs.comment-id }}
96+
issue-number: ${{ github.event.pull_request.number }}
97+
body-path: diff.output
98+
edit-mode: replace

generic.config

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# branding
2-
CONFIG_LOGO=y
2+
CONFIG_LOGO=n
33

44
# boot
55
CONFIG_EFI_BOOTLOADER_CONTROL=y

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)