88# Description: Build OpenWrt using GitHub Actions
99#
1010
11- name : x86full OpenWrt
11+ name : j1900_x86 OpenWrt
1212
1313on :
1414 repository_dispatch :
2424# types: started
2525
2626env :
27- REPO_URL : https://github.com/coolsnowwolf/lede
27+ REPO_URL : https://www. github.com/openwrt/openwrt
2828 REPO_BRANCH : master
2929 FEEDS_CONF : feeds.conf.default
30- CONFIG_FILE : config/x86duobo .config
31- DIY_P1_SH : diy -part1.sh
32- DIY_P2_SH : diy -part2.sh
33- UPLOAD_BIN_DIR : false
30+ CONFIG_FILE : config/j1900 .config
31+ DIY_P1_SH : diyJ1900 -part1.sh
32+ DIY_P2_SH : diyJ1900 -part2.sh
33+ UPLOAD_BIN_DIR : true
3434 UPLOAD_FIRMWARE : true
3535 UPLOAD_COWTRANSFER : true
3636 UPLOAD_WETRANSFER : true
6969 chmod +x $DIY_P1_SH
7070 cd openwrt
7171 $GITHUB_WORKSPACE/$DIY_P1_SH
72+ git clone https://github.com/BROBIRD/openwrt-r8168 ./package/r8168
73+
7274 - name : Update feeds
7375 run : cd openwrt && ./scripts/feeds update -a
7476
@@ -94,19 +96,30 @@ jobs:
9496 run : |
9597 cd openwrt
9698 make defconfig
97- make download -j8
99+ make download -j8 V=99 2>&1 | tee download.log
100+ make check | tee check.log
98101 find dl -size -1024c -exec ls -l {} \;
99102 find dl -size -1024c -exec rm -f {} \;
100103 - name : Compile the firmware
101104 id : compile
102105 run : |
103106 cd openwrt
104107 echo -e "$(nproc) thread compile"
105- make -j$(nproc) || make -j2 || make -j2 V=s
108+ make -j$(nproc) V=99 2>&1 | tee build.log || make -j2 V=99 2>&1 | tee build.log
106109 echo "::set-output name=status::success"
107110 grep '^CONFIG_TARGET.*DEVICE.*=y' .config | sed -r 's/.*DEVICE_(.*)=y/\1/' > DEVICE_NAME
108111 [ -s DEVICE_NAME ] && echo "DEVICE_NAME=_$(cat DEVICE_NAME)" >> $GITHUB_ENV
109- echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
112+ echo "FILE_DATE=_$(date +"%Y%m%d%H%M")" >> $GITHUB_ENV
113+
114+ - name : Organize config and log files
115+ id : organize
116+ run : |
117+ cd openwrt
118+ mv download.log bin/targets/*/*/download.log
119+ mv check.log bin/targets/*/*/check.log
120+ mv build.log bin/targets/*/*/build.log
121+ mv .config bin/targets/*/*/.config
122+
110123 - name : Check space usage
111124 if : (!cancelled())
112125 run : df -hT
@@ -126,6 +139,7 @@ jobs:
126139 rm -rf packages
127140 echo "FIRMWARE=$PWD" >> $GITHUB_ENV
128141 echo "::set-output name=status::success"
142+
129143 - name : Upload firmware directory
130144 uses : actions/upload-artifact@main
131145 if : steps.organize.outputs.status == 'success' && !cancelled()
0 commit comments