Skip to content

Commit 6bad7c0

Browse files
add clash test
1 parent 8ffa48b commit 6bad7c0

File tree

2 files changed

+37
-30
lines changed

2 files changed

+37
-30
lines changed

.github/workflows/build_image_all.yml

Lines changed: 8 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ jobs:
2727
remove-android: 'true'
2828
remove-haskell: 'true'
2929
remove-codeql: 'true'
30+
remove-docker-images: 'true'
3031

3132
- name: modify docker path
3233
run: |
@@ -37,39 +38,16 @@ jobs:
3738
sudo ln -sf ${{ github.workspace }}/docker /var/lib/docker
3839
sudo systemctl start docker
3940
40-
41-
- name: Run Make
42-
uses: addnab/docker-run-action@v3
41+
- name: Checkout
42+
uses: actions/checkout@v2
4343
with:
44-
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.version }}
45-
options: --user root
46-
run: |
47-
export VOLUME_HOME=$(pwd)
48-
export BUILD_DIR="/builder"
49-
export BUILDER="buildbot"
50-
cd $BUILD_DIR
51-
apt-get update
52-
apt install sudo tree -y
53-
sudo -u $BUILDER mkdir package/luci-app-openclash
54-
pushd package/luci-app-openclash
55-
sudo -u $BUILDER git init
56-
sudo -u $BUILDER git remote add -f origin https://github.com/vernesong/OpenClash.git
57-
sudo -u $BUILDER git config core.sparsecheckout true
58-
sudo -u $BUILDER echo "luci-app-openclash" >> .git/info/sparse-checkout
59-
sudo -u $BUILDER git pull origin master
60-
sudo -u $BUILDER git branch --set-upstream-to=origin/master master
61-
popd
44+
fetch-depth: 0
6245

63-
pushd package/luci-app-openclash/luci-app-openclash/tools/po2lmo
64-
sudo -u $BUILDER make && sudo make install
65-
popd
46+
- name: Run Make
47+
run: |
48+
chmod +x ${{ github.workspace }}/build_clash.sh
49+
docker run -dit --name openwrt-sdk-${{ matrix.arch }}-${{ matrix.version }} --user root -v ${{ github.workspace }}/build_clash.sh:/build_clash.sh openwrt/sdk:${{ matrix.arch }}-${{ matrix.version }} /build_clash.sh
6650
67-
sudo -u $BUILDER make defconfig
68-
echo "================== DEBUG PRINT BEGIN =================="
69-
cat .config
70-
echo "================== DEBUG PRINT END =================="
71-
sudo -u $BUILDER make package/luci-app-openclash/luci-app-openclash/compile V=99
72-
tree bin/packages
7351
7452
build_passwall:
7553
strategy:

build_clash.sh

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
#!/bin/bash
2+
set -e
3+
4+
export VOLUME_HOME=$(pwd)
5+
export BUILD_DIR="/builder"
6+
export BUILDER="buildbot"
7+
cd $BUILD_DIR
8+
apt-get update
9+
apt install sudo tree -y
10+
sudo -u $BUILDER mkdir package/luci-app-openclash
11+
pushd package/luci-app-openclash
12+
sudo -u $BUILDER git init
13+
sudo -u $BUILDER git remote add -f origin https://github.com/vernesong/OpenClash.git
14+
sudo -u $BUILDER git config core.sparsecheckout true
15+
sudo -u $BUILDER echo "luci-app-openclash" >> .git/info/sparse-checkout
16+
sudo -u $BUILDER git pull origin master
17+
sudo -u $BUILDER git branch --set-upstream-to=origin/master master
18+
popd
19+
20+
pushd package/luci-app-openclash/luci-app-openclash/tools/po2lmo
21+
sudo -u $BUILDER make && sudo make install
22+
popd
23+
24+
sudo -u $BUILDER make defconfig
25+
echo "================== DEBUG PRINT BEGIN =================="
26+
cat .config
27+
echo "================== DEBUG PRINT END =================="
28+
sudo -u $BUILDER make package/luci-app-openclash/luci-app-openclash/compile V=99
29+
tree bin/packages

0 commit comments

Comments
 (0)