-
Notifications
You must be signed in to change notification settings - Fork 0
151 lines (142 loc) · 5.79 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
name: CI
on:
push:
branches: [ "main" ]
pull_request:
workflow_dispatch:
jobs:
linux:
runs-on: ubuntu-22.04
steps:
- run: |
df -h
echo ---
docker rmi -f $(docker images -q)
aria2c -q https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh && NONINTERACTIVE=1 bash ./uninstall.sh -f -q
sudo apt autopurge -y docker-buildx-plugin docker-ce-cli docker-ce containerd.io podman buildah skopeo kubectl temurin-*-jdk adoptium-ca-certificates openjdk-* ant ant-optional postgresql-* libpq-dev libmysqlclient* msodbcsql* mssql-tools unixodbc-dev mysql-client* mysql-common mysql-server* php*-*sql sphinxsearch mongodb* firefox google-chrome-stable microsoft-edge-stable xvfb apache2 apache2-* nginx nginx-* php-* php7* php8* session-manager-plugin azure-cli google-cloud-cli heroku gh subversion mercurial vim vim-* dotnet* aspnetcore* mono-* mono* libmono-* libmono* monodoc* msbuild nuget ruby* rake ri g++-9 g++-10 g++-12 gcc-9 gcc-10 gcc-12 gfortran-* clang-* libclang* llvm-* libllvm* lldb-* lld-* clang-format-* clang-tidy-* powershell r-base* r-cran* r-doc* r-recommended snapd man-db manpages libgtk-3-* ubuntu-mono *-icon-theme imagemagick imagemagick-6-common libgl1-mesa-dri firebird*
sudo rm -rf /usr/share/swift /usr/share/miniconda /usr/local/lib/node_modules /usr/share/mysql* /usr/local/lib/android/ /usr/lib/jvm/ /home/linuxbrew
echo ---
df -h
- name: Install Build Tools
run: |
sudo apt update && sudo apt install -y aria2 debhelper dpkg-dev build-essential patch bc bison flex libssl-dev libelf-dev git perl python3
- name: Checkout linux
run: aria2c https://github.com/NekoSekaiMoe/asus_linux_debian_test/releases/download/v1/linux-src.tar.xz -o src.tar.xz && tar -xf src.tar.xz
# - name: Ccache for gh actions
# uses: hendrikmuhs/ccache-action@v1.2.13
# with:
# max-size: 8192M
# key: ee2b31d23ae6068c6aecc2e81e4b71c40ed72654
- name: Configure and build
run: |
cd src
export USE_CCACHE=1
cp arch/x86/configs/asus_defconfig .config
#make asus_defconfig
bash config.sh
make olddefconfig bindeb-pkg -j8
rm -rf ../*dbg*.deb
#- name: build
# env:
# CC: "ccache gcc"
# CXX: "ccache g++"
# AR: "ccache ar"
# run: |
# cd src
# export USE_CCACHE=1
# make -j8 bindeb-pkg
- name: Upload deb
uses: actions/upload-artifact@v4
with:
name: linux
path: ./*.deb
asusctl:
runs-on: ubuntu-latest
container: debian:trixie
steps:
- run: apt update && apt install git build-essential dpkg-dev -y
- run: |
git clone https://github.com/NekoSekaiMoe/asus_linux_debian_test env
git clone https://gitlab.com/asus-linux/asusctl src
- run: |
cd src
mv ../env/asusctl/debian ./
apt update && apt build-dep . -y
- run: |
cd src && export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig && dpkg-buildpackage -b -us -uc
- name: Upload deb
uses: actions/upload-artifact@v4
with:
name: asusctl
path: ./*.deb
supergfxctl:
runs-on: ubuntu-latest
container: debian:trixie
steps:
- run: apt update && apt install git build-essential dpkg-dev -y
- run: |
git clone https://github.com/NekoSekaiMoe/asus_linux_debian_test env
git clone https://gitlab.com/asus-linux/supergfxctl src
- run: |
cd src
mv ../env/supergfxctl/debian ./
apt update && apt build-dep . -y
- run: |
cd src && export PKG_CONFIG_PATH=/usr/lib/x86_64-linux-gnu/pkgconfig && dpkg-buildpackage -b -us -uc
- name: Upload deb
uses: actions/upload-artifact@v4
with:
name: supergfxctl
path: ./*.deb
live-build:
needs:
- linux
runs-on: ubuntu-22.04
permissions:
contents: write
steps:
- run: mkdir deb
- name: Download linux
uses: actions/download-artifact@v4
with:
name: linux
path: deb
- name: Download supergfxctl
uses: actions/download-artifact@v4
with:
name: supergfxctl
path: deb
- name: Download asusctl
uses: actions/download-artifact@v4
with:
name: asusctl
path: deb
- run: rm -rf deb/asusctl-dbgsym_6.0.11_amd64.deb
- run: docker rmi -f $(docker images -q)
- run: wget -q https://raw.githubusercontent.com/Homebrew/install/master/uninstall.sh && NONINTERACTIVE=1 bash ./uninstall.sh -f -q
- run: sudo apt-get -y install debootstrap
- run: sudo debootstrap --arch=amd64 --variant=minbase bookworm rootfs
- name: mount
run: |
sudo mount -t proc /proc rootfs/proc
sudo mount --rbind /dev rootfs/dev
sudo mount --rbind /sys rootfs/sys
sudo mv deb rootfs/deb
- run: sudo chroot rootfs /bin/apt-get -y install python3 wget git live-build debian-archive-keyring gpg dosfstools genisoimage squashfs-tools xorriso grub-common grub-pc-bin grub-efi-amd64-bin nano
- run: sudo chroot rootfs /bin/wget https://github.com/dpkg123/lb-config/raw/main/build.py
- run: sudo chroot rootfs /bin/python3 /build.py
- run: sudo du -h -s rootfs/ci/live-build/live*.iso
continue-on-error: true
- name: upload iso
uses: actions/upload-artifact@v4
if: github.event_name == 'workflow_dispatch'
with:
name: iso-debian
path: rootfs/ci/live-build/live-image-amd64.hybrid.iso
retention-days: 14
- name: upload log
uses: actions/upload-artifact@v4
if: github.event_name == 'push'
with:
name: log
path: rootfs/ci/live-build/build.log