-
Notifications
You must be signed in to change notification settings - Fork 113
130 lines (111 loc) · 3.86 KB
/
test1.yml
File metadata and controls
130 lines (111 loc) · 3.86 KB
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
#
# Copyright (c) 2022-2024 SMALLPROGRAM <https://github.com/smallprogram/OpenWrtAction>
#
# This is free software, licensed under the MIT License.
# See /LICENSE for more information.
#
# https://github.com/smallprogram/OpenWrtAction
# Description: Build OpenWrt using GitHub Actions
#
name: test_immortalwrt1
on:
workflow_dispatch:
inputs:
ssh:
description: 'SSH connection to Actions'
required: false
default: 'false'
is_display_detailed:
description: 'Whether to display detailed information about compilation'
required: false
default: 'false'
is_single_threaded:
description: 'Whether single-threaded compilation'
required: false
default: 'false'
# schedule:
# - cron: 0 */8 * * *
env:
MAKE_DEFCONFIG_SH: compile_script/step01_make_defconfig.sh
GENERATE_RELEASE_TAG_SH: compile_script/step02_generate_release_tag.sh
GENERATE_GIT_LOG_SH: compile_script/step03_generate_git_log.sh
UPDATE_GIT_LOG_SH: compile_script/step06_update_git_log.sh
ORGANIZE_TAG_SH: compile_script/step07_organize_tag.sh
PLATFORMS_SH: compile_script/platforms.sh
UPLOAD_BIN_DIR: false
UPLOAD_FIRMWARE: true
UPLOAD_ARTIFACT: true
UPLOAD_RELEASE: true
TZ: Asia/Shanghai
jobs:
job_build:
runs-on: ubuntu-latest
name: build
steps:
- name: Initialization Environment
run: |
sudo timedatectl set-timezone "$TZ"
sudo mkdir -p /workdir
sudo chown $USER:$GROUPS /workdir
df -hT
- name: Maximize Build Space
uses: smallprogram/maximize-build-diskspace@main
with:
root-reserve-mb: 6144
swap-size-mb: 10240
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
build-mount-path: '/workdir'
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Install Packages
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo -E apt-get -qq update
sudo -E apt-get -qq install $(curl -fsSL https://github.com/smallprogram/OpenWrtAction/raw/main/diy_script/immortalwrt_dependence)
# sudo -E apt-get -qq autoremove --purge
# sudo -E apt-get -qq clean
sudo timedatectl set-timezone "$TZ"
- name: Clone Source Code
working-directory: /workdir
run: |
git clone -b master --single-branch https://github.com/immortalwrt/immortalwrt.git openwrt
ln -sf /workdir/openwrt $GITHUB_WORKSPACE/openwrt
- name: Load Custom Feeds
run: |
# cp -r feeds_config/immortalwrt.feeds.conf.default openwrt/feeds.conf.default
chmod +x diy_script/immortalwrt_diy/diy-part1.sh
cd openwrt
$GITHUB_WORKSPACE/diy_script/immortalwrt_diy/diy-part1.sh
- name: Update Feeds
run: cd openwrt && ./scripts/feeds update -a
- name: Install Feeds
run: cd openwrt && ./scripts/feeds install -a
- name: SSH connection to Actions
uses: mxschmitt/action-tmate@v3.16
if: (github.event.inputs.ssh == 'true' && github.event.inputs.ssh != 'false')
- name: Load Configuration
run: |
cp -r config/immortalwrt_config/X86.config openwrt/.config
chmod +x diy_script/immortalwrt_diy/diy-part2.sh
cd openwrt
$GITHUB_WORKSPACE/diy_script/immortalwrt_diy/diy-part2.sh
make defconfig
- name: Download Package
id: package
run: |
cd $GITHUB_WORKSPACE/openwrt
make download -j8
find dl -size -1024c -exec ls -l {} \;
find dl -size -1024c -exec rm -f {} \;
- name: Generate
id: compile
run: |
cd $GITHUB_WORKSPACE/openwrt
env -u CI make -j$(nproc)