Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 99 additions & 0 deletions .github/workflows/compare.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
name: Compare Kernel Config

on:
pull_request:
types: [opened, reopened, synchronize]
branches:
- 'master'

jobs:
genconfig:
strategy:
fail-fast: false
matrix:
include:
- arch: x86_64
karch: x86
- arch: aarch64
karch: arm64
- arch: riscv64
karch: riscv
- arch: loongarch64
karch: loongarch
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: repo
- uses: actions/checkout@v4
with:
ref: master
path: repo-old
- uses: actions/checkout@v4
with:
repository: eweOS/packages
ref: linux
path: pkg
- run: >-
docker run
--rm
-v $(pwd):/${{ github.workspace }}
-w ${{ github.workspace }}
ghcr.io/eweos/docker:buildenv
bash -c "
pushd pkg &&
pacman -Syu --noconfirm && makepkg -os --noconfirm &&
kdir=pkg/src/\$(source PKGBUILD && echo \$_basename-\$pkgver) &&
popd &&
repo/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} \$kdir &&
cp \$kdir/.config config-new &&
repo-old/scripts/generate-config.sh ${{ matrix.arch }} ${{ matrix.karch }} \$kdir &&
cp \$kdir/.config config-old &&
diff -urN config-old config-new > config.diff || true
"
- uses: actions/upload-artifact@v4
with:
name: diff-${{ matrix.arch }}
path: config.diff

compare:
runs-on: ubuntu-latest
needs: [genconfig]
steps:
- uses: peter-evans/find-comment@v3
id: fc
with:
issue-number: ${{ github.event.pull_request.number }}
comment-author: 'github-actions[bot]'
body-includes: '## Config Compare'
- uses: actions/download-artifact@v4
with:
name: diff-x86_64
path: diff-x86_64
- uses: actions/download-artifact@v4
with:
name: diff-aarch64
path: diff-aarch64
- uses: actions/download-artifact@v4
with:
name: diff-riscv64
path: diff-riscv64
- uses: actions/download-artifact@v4
with:
name: diff-loongarch64
path: diff-loongarch64
- run: >-
echo "## Config Compare" >> diff.output &&
for outarch in x86_64 aarch64 riscv64 loongarch64; do
(echo "## $outarch" >> diff.output &&
echo '```diff' >> diff.output &&
echo "diff for $outarch" >> diff.output &&
cat diff-$outarch/config.diff >> diff.output &&
echo '```' >> diff.output);
done
- uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ steps.fc.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
body-path: diff.output
edit-mode: replace
2 changes: 1 addition & 1 deletion generic.config
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# branding
CONFIG_LOGO=y
CONFIG_LOGO=n

# boot
CONFIG_EFI_BOOTLOADER_CONTROL=y
Expand Down
4 changes: 3 additions & 1 deletion scripts/generate-config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ for _conf in "$config_path"/*.config "$config_path/$carch"/*.config; do
cat "$_conf" >> "$mergedconfig"
done

cd "$ksrc"
pushd "$ksrc"

make LLVM=1 LLVM_IAS=1 ARCH="$karch" defconfig
scripts/kconfig/merge_config.sh -m .config "$mergedconfig"
make LLVM=1 LLVM_IAS=1 ARCH="$karch" olddefconfig

popd