Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
powerAn2020 committed Nov 19, 2024
1 parent 38a7457 commit 670cba0
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/debug.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: release
name: debug
# description:

on:
workflow_dispatch:
schedule:
- cron: '40 7 * * 2'
- cron: '25 9 * * 2'
# push:

permissions:
Expand All @@ -24,7 +24,6 @@ jobs:
env:
DEBIAN_FRONTEND: noninteractive
run: |
set -x
sudo apt install -y xz-utils make git wget zip
echo "${{ github.action_path }}"
latest_version=$(wget --no-check-certificate -qO- "https://api.github.com/repos/stunnel/static-curl/releases" | grep "tag_name" | grep -oE "[0-9.]*" | head -1)
Expand All @@ -34,6 +33,7 @@ jobs:
echo "${zerotier_version}=${zerotier_latest_version}"
if [ "$zerotier_latest_version" = "$zerotier_version" -a "${{github.event_name }}" = "schedule" ]; then
echo "COMMIT=0" >> $GITHUB_ENV
echo "SKIP_NEXT=true" >> $GITHUB_ENV
exit 0
fi
echo ${zerotier_latest_version}>zerotier_version
Expand All @@ -55,8 +55,8 @@ jobs:
rm -f arm64.tar arm.tar curl.tar.xz curl32.tar.xz
- name: Update versionCode
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
set -x
module_version=$(grep -w 'version' module.prop |awk -F'=' '{print $2}')
module_versionCode=$(grep -w 'versionCode' module.prop |awk -F'=' '{print $2}')
zerotier_version=$(cat zerotier_version)
Expand Down Expand Up @@ -99,8 +99,8 @@ jobs:
# fi

- name: Build Zerotier for arm64
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
set -x
export PATH="$PWD/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/:${PATH}"
git clone https:///github.com/zerotier/ZeroTierOne.git --depth=1 -b ${{ env.VERSION }}
cp -rf ZeroTierOne ZeroTierOne_ARM
Expand All @@ -110,24 +110,23 @@ jobs:
- name: Build Zerotier for arm
run: |
set -x
export PATH="$PWD/toolchain/gcc-arm-11.2-2022.02-x86_64-arm-none-linux-gnueabihf/bin/:${PATH}"
cd ZeroTierOne_ARM
make -j $(nproc) ZT_STATIC=1 ZT_DEBUG=0 CC=arm-none-linux-gnueabihf-gcc CXX=arm-none-linux-gnueabihf-g++ LDFLAGS="-s"
cp -rf zerotier-one ../zerotier-one-arm
- name: Build UI
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
set -x
cd ui-src
npm install
npm audit fix
npm run build
mv dist/* ../webroot/
- name: Generate module for arm64/arm
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
set -x
mv zerotier-one-arm64 zerotier-one
echo 'updateJson=https://raw.githubusercontent.com/powerAn2020/ZeroTierOneForKSU/main/update_arm64.json' >>module.prop
echo 'arch=arm64' >>module.prop
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ jobs:
echo "${zerotier_version}=${zerotier_latest_version}"
if [ "$zerotier_latest_version" = "$zerotier_version" -a "${{github.event_name }}" = "schedule" ]; then
echo "COMMIT=0" >> $GITHUB_ENV
echo "SKIP_NEXT=true" >> $GITHUB_ENV
exit 0
fi
echo ${zerotier_latest_version}>zerotier_version
Expand All @@ -54,6 +55,7 @@ jobs:
rm -f arm64.tar arm.tar curl.tar.xz curl32.tar.xz
- name: Update versionCode
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
module_version=$(grep -w 'version' module.prop |awk -F'=' '{print $2}')
module_versionCode=$(grep -w 'versionCode' module.prop |awk -F'=' '{print $2}')
Expand Down Expand Up @@ -97,6 +99,7 @@ jobs:
# fi

- name: Build Zerotier for arm64
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
export PATH="$PWD/toolchain/gcc-arm-11.2-2022.02-x86_64-aarch64-none-linux-gnu/bin/:${PATH}"
git clone https:///github.com/zerotier/ZeroTierOne.git --depth=1 -b ${{ env.VERSION }}
Expand All @@ -113,6 +116,7 @@ jobs:
cp -rf zerotier-one ../zerotier-one-arm
- name: Build UI
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
cd ui-src
npm install
Expand All @@ -121,6 +125,7 @@ jobs:
mv dist/* ../webroot/
- name: Generate module for arm64/arm
if: ${{ env.SKIP_NEXT != 'true' }}
run: |
mv zerotier-one-arm64 zerotier-one
echo 'updateJson=https://raw.githubusercontent.com/powerAn2020/ZeroTierOneForKSU/main/update_arm64.json' >>module.prop
Expand All @@ -134,6 +139,7 @@ jobs:
bash build.sh ZeroTierForKSU-arm-${{ env.MODULE_VERSION }}.zip
- name: Upload artifact
if: ${{ env.SKIP_NEXT != 'true' }}
uses: actions/upload-artifact@v4
with:
name: ZeroTierForKSU
Expand All @@ -154,7 +160,7 @@ jobs:
- name: Manual Release
uses: softprops/action-gh-release@v2
if: github.event_name == 'workflow_dispatch'
if: github.event_name == 'workflow_dispatch'
with:
generate_release_notes: true
tag_name: ${{ env.MODULE_VERSION }}
Expand Down

0 comments on commit 670cba0

Please sign in to comment.