mirror of
				https://github.com/MHSanaei/3x-ui.git
				synced 2025-10-27 02:24:40 +00:00 
			
		
		
		
	Update test.yml
This commit is contained in:
		
							parent
							
								
									880157526f
								
							
						
					
					
						commit
						c3b85167a7
					
				
					 1 changed files with 12 additions and 29 deletions
				
			
		
							
								
								
									
										39
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										39
									
								
								.github/workflows/test.yml
									
									
									
									
										vendored
									
									
								
							|  | @ -8,9 +8,6 @@ on: | ||||||
| 
 | 
 | ||||||
| jobs: | jobs: | ||||||
|   build: |   build: | ||||||
|     strategy: |  | ||||||
|       matrix: |  | ||||||
|         platform: [amd64, arm64, armv7] |  | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|       - name: Checkout repository |       - name: Checkout repository | ||||||
|  | @ -21,11 +18,10 @@ jobs: | ||||||
|         with: |         with: | ||||||
|           go-version: '1.21' |           go-version: '1.21' | ||||||
|            |            | ||||||
|       - name: Install dependencies for arm64 and armv7 |       - name: Install dependencies for armv7 | ||||||
|         if: matrix.platform == 'arm64' || matrix.platform == 'armv7' |  | ||||||
|         run: | |         run: | | ||||||
|           sudo apt-get update |           sudo apt-get update | ||||||
|           sudo apt install gcc-aarch64-linux-gnu |           sudo apt install gcc-arm-linux-gnueabihf | ||||||
| 
 | 
 | ||||||
|       - name: Get dependencies |       - name: Get dependencies | ||||||
|         run: | |         run: | | ||||||
|  | @ -40,13 +36,10 @@ jobs: | ||||||
|         run: | |         run: | | ||||||
|           export CGO_ENABLED=1 |           export CGO_ENABLED=1 | ||||||
|           export GOOS=linux |           export GOOS=linux | ||||||
|           export GOARCH=${{ matrix.platform }} |           export GOARCH=arm  | ||||||
|           if [ "${{ matrix.platform }}" == "arm64" ]; then |           export GOARM=7  | ||||||
|             export CC=aarch64-linux-gnu-gcc |           export CC=arm-linux-gnueabihf-gcc  | ||||||
|           elif [ "${{ matrix.platform }}" == "armv7" ]; then |            | ||||||
|             export CC=arm-linux-gnueabihf-gcc  |  | ||||||
|             export GOARM=7  |  | ||||||
|           fi |  | ||||||
|           go build -o xui-release -v main.go |           go build -o xui-release -v main.go | ||||||
|            |            | ||||||
|           mkdir x-ui |           mkdir x-ui | ||||||
|  | @ -59,27 +52,17 @@ jobs: | ||||||
| 
 | 
 | ||||||
|       - name: Download dependencies and package  |       - name: Download dependencies and package  | ||||||
|         run: | |         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  |             wget https://github.com/XTLS/Xray-core/releases/download/v1.8.4/Xray-linux-arm32-v7a.zip  | ||||||
|             unzip Xray-linux-arm32-v7a.zip  |             unzip Xray-linux-arm32-v7a.zip  | ||||||
|             rm -f 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/geoip.dat | ||||||
|           wget https://github.com/Loyalsoldier/v2ray-rules-dat/releases/latest/download/geosite.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/MasterKia/iran-hosted-domains/releases/latest/download/iran.dat | ||||||
| 
 | 
 | ||||||
|           mv xray xray-linux-${{ matrix.platform }} |             mv xray xray-linux-armv7 | ||||||
|              |              | ||||||
|       - name: Package |       - name: Package | ||||||
|         run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui |         run: tar -zcvf x-ui-linux-${{ matrix.platform }}.tar.gz x-ui | ||||||
|  |  | ||||||
		Loading…
	
		Reference in a new issue
	
	 quydang
						quydang