mirror of
https://github.com/remittor/zapret-openwrt.git
synced 2025-12-12 22:46:54 +03:00
github: Add support SNAPSHOT branch
This commit is contained in:
40
.github/workflows/build.yml
vendored
40
.github/workflows/build.yml
vendored
@@ -65,8 +65,7 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
#branch: [ openwrt-22.03, openwrt-23.05 ]
|
branch: [ openwrt-23.05, SNAPSHOT ]
|
||||||
branch: [ openwrt-23.05 ]
|
|
||||||
arch:
|
arch:
|
||||||
- aarch64_cortex-a53
|
- aarch64_cortex-a53
|
||||||
- aarch64_cortex-a72
|
- aarch64_cortex-a72
|
||||||
@@ -94,14 +93,13 @@ jobs:
|
|||||||
- mipsel_74kc
|
- mipsel_74kc
|
||||||
- mipsel_mips32
|
- mipsel_mips32
|
||||||
- x86_64
|
- x86_64
|
||||||
#include:
|
include:
|
||||||
# - branch: SNAPSHOT
|
- branch: SNAPSHOT
|
||||||
# arch: x86_64
|
arch: aarch64_cortex-a76
|
||||||
#exclude:
|
#arch: riscv64_riscv64
|
||||||
# - branch: openwrt-22.03
|
exclude:
|
||||||
# arch: arm_fa526
|
- branch: SNAPSHOT
|
||||||
# - branch: openwrt-22.03
|
arch: arm_mpcore
|
||||||
# arch: arm_mpcore
|
|
||||||
container:
|
container:
|
||||||
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
|
image: openwrt/sdk:${{ matrix.arch }}-${{ matrix.branch }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@@ -119,6 +117,9 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
# gpg --verbose --recv-keys 0x1D53D1877742E911
|
# gpg --verbose --recv-keys 0x1D53D1877742E911
|
||||||
gpg --verbose --import <(wget -qO- 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/0x1D53D1877742E911.asc')
|
gpg --verbose --import <(wget -qO- 'https://git.openwrt.org/?p=keyring.git;a=blob_plain;f=gpg/0x1D53D1877742E911.asc')
|
||||||
|
# disable check signatures
|
||||||
|
sed -i 's/gpg --/#gpg --/g' setup.sh
|
||||||
|
# disable cleanup keys
|
||||||
sed -r -i 's/^rm.+//' setup.sh
|
sed -r -i 's/^rm.+//' setup.sh
|
||||||
./setup.sh
|
./setup.sh
|
||||||
ls -lh
|
ls -lh
|
||||||
@@ -163,14 +164,14 @@ jobs:
|
|||||||
PKGLIST=`echo package/zapret-openwrt/{zapret,zapret-tpws,zapret-mdig,zapret-ip2net,luci-app-zapret}/compile`
|
PKGLIST=`echo package/zapret-openwrt/{zapret,zapret-tpws,zapret-mdig,zapret-ip2net,luci-app-zapret}/compile`
|
||||||
make $PKGLIST V=s CONFIG_CCACHE=1 BUILD_LOG=1
|
make $PKGLIST V=s CONFIG_CCACHE=1 BUILD_LOG=1
|
||||||
|
|
||||||
find ./bin/packages/*/base -type f ! -regex ".*\(zapret\).*\.ipk$" -delete
|
find ./bin/packages/*/base -type f ! -regex ".*\(zapret\).*\.[ai]pk$" -delete
|
||||||
|
|
||||||
#echo ">>>>>>> build a repository index to make the output directory usable as local OPKG source"
|
#echo ">>>>>>> build a repository index to make the output directory usable as local OPKG source"
|
||||||
#ln -s `which usign` staging_dir/host/bin/usign
|
#ln -s `which usign` staging_dir/host/bin/usign
|
||||||
#echo "$SIGN_KEY" | base64 -d > key-build
|
#echo "$SIGN_KEY" | base64 -d > key-build
|
||||||
#make package/index
|
#make package/index
|
||||||
|
|
||||||
tar -C ./bin/packages/*/base -cvf $GITHUB_WORKSPACE/ipk-$BRANCH-$ARCH.tar --transform "s|^\./|${BRANCH/openwrt-}/$ARCH/|" --show-transformed-names .
|
tar -C ./bin/packages/*/base -cvf $GITHUB_WORKSPACE/pkg-$BRANCH-$ARCH.tar --transform "s|^\./|${BRANCH/openwrt-}/$ARCH/|" --show-transformed-names .
|
||||||
./staging_dir/host/bin/ccache --max-size=10M --show-stats
|
./staging_dir/host/bin/ccache --max-size=10M --show-stats
|
||||||
|
|
||||||
- name: Compress build logs
|
- name: Compress build logs
|
||||||
@@ -186,8 +187,8 @@ jobs:
|
|||||||
if: steps.build.outcome == 'success'
|
if: steps.build.outcome == 'success'
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: ipk-${{ matrix.branch }}-${{ matrix.arch }}
|
name: pkg-${{ matrix.branch }}-${{ matrix.arch }}
|
||||||
path: ./**/ipk-${{ matrix.branch }}-${{ matrix.arch }}.tar
|
path: pkg-*.tar
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
- name: Upload build logs
|
- name: Upload build logs
|
||||||
@@ -195,7 +196,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: logs-${{ matrix.branch }}-${{ matrix.arch }}
|
name: logs-${{ matrix.branch }}-${{ matrix.arch }}
|
||||||
path: ./**/logs-*.tar.xz
|
path: logs-*.tar.xz
|
||||||
|
|
||||||
release:
|
release:
|
||||||
needs: [ check, build ]
|
needs: [ check, build ]
|
||||||
@@ -205,22 +206,21 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
max-parallel: 1
|
max-parallel: 1
|
||||||
matrix:
|
matrix:
|
||||||
#branch: [ '22.03', '23.05' ]
|
branch: [ 'SNAPSHOT', '23.05' ]
|
||||||
branch: [ '23.05' ]
|
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
pattern: ipk-*
|
pattern: pkg-*
|
||||||
|
|
||||||
- name: Put ipk into zip
|
- name: Put packages into zip
|
||||||
env:
|
env:
|
||||||
BRANCH: ${{ matrix.branch }}
|
BRANCH: ${{ matrix.branch }}
|
||||||
TAG: ${{ needs.check.outputs.tag }}
|
TAG: ${{ needs.check.outputs.tag }}
|
||||||
DATE: ${{ needs.check.outputs.date }}
|
DATE: ${{ needs.check.outputs.date }}
|
||||||
run: |
|
run: |
|
||||||
mkdir -p public
|
mkdir -p public
|
||||||
find . -name "ipk-openwrt-$BRANCH-*.tar" -exec tar -xvf {} --wildcards '*.ipk' \;
|
find . -name "*-$BRANCH-*.tar" -exec tar -xvf {} --wildcards '*.*pk' \;
|
||||||
find $BRANCH -mindepth 1 -type d -exec sh -c 'zip -0 ./public/zapret_${TAG}_$(basename {}).zip -j {} {}/*' \;
|
find $BRANCH -mindepth 1 -type d -exec sh -c 'zip -0 ./public/zapret_${TAG}_$(basename {}).zip -j {} {}/*' \;
|
||||||
ls -lh ./public/*.zip
|
ls -lh ./public/*.zip
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user