Only run fedora build for testing

This commit is contained in:
Maximilian Luz 2020-01-20 15:12:48 +01:00
parent b4203834ee
commit 145f353845
No known key found for this signature in database
GPG key ID: 70EC0937F6C26F02

View file

@ -14,130 +14,130 @@ env:
KEY_NAME: surface-linux KEY_NAME: surface-linux
jobs: jobs:
build-arch: # build-arch:
name: Build Arch Linux Kernel # name: Build Arch Linux Kernel
runs-on: ubuntu-latest # runs-on: ubuntu-latest
container: archlinux # container: archlinux
steps: # steps:
- name: Checkout code # - name: Checkout code
uses: actions/checkout@v2 # uses: actions/checkout@v2
#
- name: Install build dependencies # - name: Install build dependencies
run: | # run: |
# Install makepkg deps # # Install makepkg deps
pacman -Sy sudo binutils fakeroot grep base-devel git --noconfirm # pacman -Sy sudo binutils fakeroot grep base-devel git --noconfirm
#
- name: Build # - name: Build
run: | # run: |
cd pkg/arch/kernel # cd pkg/arch/kernel
#
# Fix permissions (can't makepkg as root) # # Fix permissions (can't makepkg as root)
echo "nobody ALL=(ALL) NOPASSWD: /usr/bin/pacman" >> /etc/sudoers # echo "nobody ALL=(ALL) NOPASSWD: /usr/bin/pacman" >> /etc/sudoers
chown -R nobody . # chown -R nobody .
#
# Package compression settings (Matches latest Arch) # # Package compression settings (Matches latest Arch)
export PKGEXT='.pkg.tar.zst' # export PKGEXT='.pkg.tar.zst'
export COMPRESSZST=(zstd -c -T0 --ultra -20 -) # export COMPRESSZST=(zstd -c -T0 --ultra -20 -)
export MAKEFLAGS="-j2" # export MAKEFLAGS="-j2"
#
# Build # # Build
su nobody --pty -p -s /bin/bash -c 'makepkg -f --syncdeps --skippgpcheck --noconfirm' # su nobody --pty -p -s /bin/bash -c 'makepkg -f --syncdeps --skippgpcheck --noconfirm'
#
- name: Prepare release # - name: Prepare release
run: | # run: |
mkdir release # mkdir release
mv pkg/arch/kernel/*.pkg.tar.zst release # mv pkg/arch/kernel/*.pkg.tar.zst release
#
- name: Sign packages # - name: Sign packages
env: # env:
GPG_KEY: ${{ secrets.GITHUB_GPG_KEY }} # GPG_KEY: ${{ secrets.GITHUB_GPG_KEY }}
run: | # run: |
cd release # cd release
#
# import GPG key # # import GPG key
echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes # echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
export GPG_TTY=$(tty) # export GPG_TTY=$(tty)
#
# sign packages # # sign packages
ls *.pkg.tar.zst | xargs -L1 gpg --detach-sign --batch --no-tty -u $KEY_ID # ls *.pkg.tar.zst | xargs -L1 gpg --detach-sign --batch --no-tty -u $KEY_ID
#
- name: Upload artifacts # - name: Upload artifacts
uses: actions/upload-artifact@v1 # uses: actions/upload-artifact@v1
with: # with:
name: arch-latest # name: arch-latest
path: release # path: release
#
build-debian: # build-debian:
name: Build Debian Kernel # name: Build Debian Kernel
runs-on: ubuntu-latest # runs-on: ubuntu-latest
container: debian:sid # container: debian:sid
steps: # steps:
- name: Checkout code # - name: Checkout code
uses: actions/checkout@v2 # uses: actions/checkout@v2
#
- name: Install build dependencies # - name: Install build dependencies
run: | # run: |
sed 's/^deb /deb-src /' /etc/apt/sources.list >> /etc/apt/sources.list # sed 's/^deb /deb-src /' /etc/apt/sources.list >> /etc/apt/sources.list
apt-get -y update # apt-get -y update
apt-get -y install build-essential fakeroot rsync git wget python3-debian dpkg-sig lz4 # apt-get -y install build-essential fakeroot rsync git wget python3-debian dpkg-sig lz4
apt-get -y build-dep linux # apt-get -y build-dep linux
#
- name: Prepare kernel source # - name: Prepare kernel source
env: # env:
KERNEL_VERSION: 5.4.13 # KERNEL_VERSION: 5.4.13
run: | # run: |
cd pkg/debian # cd pkg/debian
#
# download sources # # download sources
wget https://cdn.kernel.org/pub/linux/kernel/v${KERNEL_VERSION%%.*}.x/linux-$KERNEL_VERSION.tar.xz # wget https://cdn.kernel.org/pub/linux/kernel/v${KERNEL_VERSION%%.*}.x/linux-$KERNEL_VERSION.tar.xz
tar xf linux-$KERNEL_VERSION.tar.xz # tar xf linux-$KERNEL_VERSION.tar.xz
#
mv linux-$KERNEL_VERSION linux && cd linux # mv linux-$KERNEL_VERSION linux && cd linux
#
# apply build patches # # apply build patches
for PATCH in ../*.patch; do patch -p1 < ${PATCH}; done # for PATCH in ../*.patch; do patch -p1 < ${PATCH}; done
#
# apply surface patches # # apply surface patches
for PATCH in ../../../patches/${KERNEL_VERSION%.*}/*.patch; do patch -p1 < ${PATCH}; done # for PATCH in ../../../patches/${KERNEL_VERSION%.*}/*.patch; do patch -p1 < ${PATCH}; done
#
- name: Configure # - name: Configure
run: | # run: |
cd pkg/debian/linux # cd pkg/debian/linux
#
# copy config # # copy config
cp ../debian.config .config # cp ../debian.config .config
#
# update config # # update config
make olddefconfig # make olddefconfig
#
- name: Build # - name: Build
run: | # run: |
cd pkg/debian/linux # cd pkg/debian/linux
#
export LOCALVERSION="-surface" # export LOCALVERSION="-surface"
make bindeb-pkg -j2 # make bindeb-pkg -j2
#
- name: Prepare release # - name: Prepare release
run: | # run: |
mkdir release # mkdir release
mv pkg/debian/*.deb release # mv pkg/debian/*.deb release
#
- name: Sign packages # - name: Sign packages
env: # env:
GPG_KEY: ${{ secrets.GITHUB_GPG_KEY }} # GPG_KEY: ${{ secrets.GITHUB_GPG_KEY }}
run: | # run: |
# import GPG key # # import GPG key
echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes # echo "$GPG_KEY" | base64 -d | gpg --import --no-tty --batch --yes
export GPG_TTY=$(tty) # export GPG_TTY=$(tty)
#
# sign package # # sign package
dpkg-sig -g "--batch --no-tty" --sign builder -k $KEY_ID release/*.deb # dpkg-sig -g "--batch --no-tty" --sign builder -k $KEY_ID release/*.deb
#
- name: Upload artifacts # - name: Upload artifacts
uses: actions/upload-artifact@v1 # uses: actions/upload-artifact@v1
with: # with:
name: debian-latest # name: debian-latest
path: release # path: release
build-fedora: build-fedora:
name: Build Fedora Kernel name: Build Fedora Kernel
@ -187,18 +187,19 @@ jobs:
release: release:
name: Publish release name: Publish release
needs: [build-arch, build-debian] # needs: [build-arch, build-debian]
needs: [build-fedora]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Download Arch Linux artifacts # - name: Download Arch Linux artifacts
uses: actions/download-artifact@v1 # uses: actions/download-artifact@v1
with: # with:
name: arch-latest # name: arch-latest
#
- name: Download Debian artifacts # - name: Download Debian artifacts
uses: actions/download-artifact@v1 # uses: actions/download-artifact@v1
with: # with:
name: debian-latest # name: debian-latest
- name: Download Fedora artifacts - name: Download Fedora artifacts
uses: actions/download-artifact@v1 uses: actions/download-artifact@v1