test ci
This commit is contained in:
		
							parent
							
								
									d6ff6cfb5b
								
							
						
					
					
						commit
						f6691914c7
					
				
							
								
								
									
										27
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										27
									
								
								.github/workflows/build.yml
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@ -0,0 +1,27 @@
 | 
			
		||||
name: Build deb packages
 | 
			
		||||
on: push
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  build:
 | 
			
		||||
    name: Build my artifact
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Maximize build space
 | 
			
		||||
        uses: easimon/maximize-build-space@master
 | 
			
		||||
        with:
 | 
			
		||||
          root-reserve-mb: 1024
 | 
			
		||||
          swap-size-mb: 1024
 | 
			
		||||
          remove-dotnet: 'true'
 | 
			
		||||
          remove-android: 'true'
 | 
			
		||||
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@v2
 | 
			
		||||
 | 
			
		||||
      - name: Build
 | 
			
		||||
        run: sudo bash build_action.sh
 | 
			
		||||
 | 
			
		||||
      - name: Artifact
 | 
			
		||||
        uses: actions/upload-artifact@v2
 | 
			
		||||
        with:
 | 
			
		||||
          name: artifact
 | 
			
		||||
          path: artifact/
 | 
			
		||||
							
								
								
									
										36
									
								
								build_action.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								build_action.sh
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,36 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
VERSION=$(grep 'Kernel Configuration' < config | awk '{print $3}')
 | 
			
		||||
 | 
			
		||||
# add deb-src to sources.list
 | 
			
		||||
sed -i "/deb-src/s/# //g" /etc/apt/sources.list
 | 
			
		||||
 | 
			
		||||
# install dep
 | 
			
		||||
sudo apt update
 | 
			
		||||
sudo apt install -y wget
 | 
			
		||||
sudo apt build-dep -y linux
 | 
			
		||||
 | 
			
		||||
# change dir to workplace
 | 
			
		||||
cd "${GITHUB_WORKSPACE}" || exit
 | 
			
		||||
 | 
			
		||||
# download kernel source
 | 
			
		||||
wget http://www.kernel.org/pub/linux/kernel/v5.x/linux-"$VERSION".tar.xz
 | 
			
		||||
tar -xf linux-"$VERSION".tar.xz
 | 
			
		||||
cd linux-"$VERSION" || exit
 | 
			
		||||
 | 
			
		||||
# copy config file
 | 
			
		||||
cp ../config .config
 | 
			
		||||
 | 
			
		||||
# apply patches
 | 
			
		||||
# shellcheck source=src/util.sh
 | 
			
		||||
source ./patch.d/*.sh
 | 
			
		||||
 | 
			
		||||
# build deb packages
 | 
			
		||||
CPU_CORES=$(grep -c processor < /proc/cpuinfo)
 | 
			
		||||
make deb-pkg -j"$CPU_CORES"
 | 
			
		||||
 | 
			
		||||
# copy deb packages to artifact dir
 | 
			
		||||
cd ..
 | 
			
		||||
mkdir "artifact"
 | 
			
		||||
# shellcheck disable=SC2010
 | 
			
		||||
cp "$(ls -- *.deb | grep -v dbg)" artifact/
 | 
			
		||||
							
								
								
									
										26
									
								
								build_on_uos.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										26
									
								
								build_on_uos.sh
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,26 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# add deb-src to sources.list
 | 
			
		||||
echo "deb-src https://home-packages.chinauos.com/home plum main contrib non-free" >> /etc/apt/sources.list
 | 
			
		||||
 | 
			
		||||
# install dep
 | 
			
		||||
sudo apt update
 | 
			
		||||
sudo apt install -y wget
 | 
			
		||||
sudo apt build-dep -y linux
 | 
			
		||||
 | 
			
		||||
# download kernel source
 | 
			
		||||
wget http://www.kernel.org/pub/linux/kernel/v5.x/linux-5.10.41.tar.xz
 | 
			
		||||
tar -xf linux-5.10.41.tar.xz
 | 
			
		||||
cd linux-5.10.41 || exit
 | 
			
		||||
 | 
			
		||||
# copy config file
 | 
			
		||||
cp /boot/config-5.10.41-amd64-desktop .config
 | 
			
		||||
 | 
			
		||||
# change version string
 | 
			
		||||
sed -i "s/-desktop/-debuggerx/g" .config
 | 
			
		||||
 | 
			
		||||
# reduce ACPI_MAX_LOOP_TIMEOUT value
 | 
			
		||||
sed -i "/ACPI_MAX_LOOP_TIMEOUT/s/30/3/g" include/acpi/acconfig.h
 | 
			
		||||
 | 
			
		||||
CPU_CORES=$(grep -c processor < /proc/cpuinfo)
 | 
			
		||||
make deb-pkg -j"$CPU_CORES"
 | 
			
		||||
							
								
								
									
										4
									
								
								patch.d/redmi_book_air_13_acpi.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								patch.d/redmi_book_air_13_acpi.sh
									
									
									
									
									
										Normal file
									
								
							@ -0,0 +1,4 @@
 | 
			
		||||
#!/usr/bin/env bash
 | 
			
		||||
 | 
			
		||||
# reduce ACPI_MAX_LOOP_TIMEOUT value
 | 
			
		||||
sed -i "/ACPI_MAX_LOOP_TIMEOUT/s/30/3/g" include/acpi/acconfig.h
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user