From c3b85167a7f30a0b07d1d4620fb424fcb1ff4df3 Mon Sep 17 00:00:00 2001 From: quydang <81231812+quydang04@users.noreply.github.com> Date: Wed, 4 Oct 2023 17:07:08 +0700 Subject: [PATCH] Update test.yml --- .github/workflows/test.yml | 41 +++++++++++--------------------------- 1 file changed, 12 insertions(+), 29 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3498c645..1b020f97 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,9 +8,6 @@ on: jobs: build: - strategy: - matrix: - platform: [amd64, arm64, armv7] runs-on: ubuntu-latest steps: - name: Checkout repository @@ -21,11 +18,10 @@ jobs: with: go-version: '1.21' - - name: Install dependencies for arm64 and armv7 - if: matrix.platform == 'arm64' || matrix.platform == 'armv7' + - name: Install dependencies for armv7 run: | sudo apt-get update - sudo apt install gcc-aarch64-linux-gnu + sudo apt install gcc-arm-linux-gnueabihf - name: Get dependencies run: | @@ -40,13 +36,10 @@ jobs: run: | export CGO_ENABLED=1 export GOOS=linux - export GOARCH=${{ matrix.platform }} - if [ "${{ matrix.platform }}" == "arm64" ]; then - export CC=aarch64-linux-gnu-gcc - elif [ "${{ matrix.platform }}" == "armv7" ]; then - export CC=arm-linux-gnueabihf-gcc - export GOARM=7 - fi + export GOARCH=arm + export GOARM=7 + export CC=arm-linux-gnueabihf-gcc + go build -o xui-release -v main.go mkdir x-ui @@ -59,28 +52,18 @@ jobs: - name: Download dependencies and package run: | - if [ "${{ matrix.platform }}" == "amd64" ]; then - wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-64.zip - unzip Xray-linux-64.zip - rm -f Xray-linux-64.zip - elif [ "${{ matrix.platform }}" == "arm64" ]; then - wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm64-v8a.zip - unzip Xray-linux-arm64-v8a.zip - rm -f Xray-linux-arm64-v8a.zip - elif [ "${{ matrix.platform }}" == "armv7" ]; then wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v7a.zip unzip Xray-linux-arm32-v7a.zip rm -f Xray-linux-arm32-v7a.zip - fi - rm -f geoip.dat geosite.dat iran.dat + rm -f geoip.dat geosite.dat iran.dat - wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat - wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat - wget https://github.com/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat + wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geoip.dat + wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.dat + wget https://github.com/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat - mv xray xray-linux-${{ matrix.platform }} - + mv xray xray-linux-armv7 + - name: Package run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui