-
Notifications
You must be signed in to change notification settings - Fork 0
85 lines (77 loc) · 2.44 KB
/
build.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
name: Build
on:
pull_request:
jobs:
checks:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Lint"
run: |
docker run \
--quiet \
-v "$PWD":/repo \
ghcr.io/t2linux/fedora-ci:41 \
/repo/lint.sh
build:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v41
with:
base_sha: ${{ steps.branch-name.outputs.base_ref_branch }}
files: |
kernel/*
t2linux-repos/*
rust-tiny-dfr/*
t2linux-audio/*
t2linux-config/*
rust-arraydeque/*
rust-nonempty/*
rust-rust-ini0.20/*
t2fanrd/*
linux-apfs-rw/*
linux-apfs-rw-kmod/*
t2linux-scripts/*
t2linux-release/*
dir_names: "true"
- name: "Increase Disk Space"
if: contains(steps.changed-files.outputs.modified_files, 'kernel')
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
sudo rm -rf /home/linuxbrew
sudo apt-get remove -y --purge fonts-noto-color-emoji subversion \
sshpass g++ gcc gnupg2 imagemagick jq libmagic-dev \
libmagickcore-dev libmagickwand-dev libssl-dev \
mercurial openssh-client p7zip-full ftp bison
sudo apt-get autoremove -y
- name: "Build"
if: steps.changed-files.outputs.any_changed == 'true'
run: |
CHANGED_PACKAGES=( $(for c in ${CHANGES[@]}; do cut -d/ -f1<<<$c; done | sort -u) )
docker run \
--privileged \
-v "$PWD":/repo \
ghcr.io/t2linux/fedora-ci:41 \
/repo/build-packages.sh "${CHANGED_PACKAGES[@]}"
env:
CHANGES: ${{ steps.changed-files.outputs.all_changed_files }}
- name: "Upload Artifact"
if: '!cancelled()'
uses: actions/upload-artifact@v3
with:
name: results
path: |
builddir/results/default/*
!builddir/results/default/repodata