Skip to content

Build v2rayA feed

Build v2rayA feed #57

name: Build v2rayA feed
on:
workflow_dispatch:
release:
types:
- published
jobs:
build:
name: Build packages for ${{ matrix.arch }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- arch: aarch64_cortex-a53
runtime_test: false
- arch: aarch64_cortex-a72
runtime_test: false
- arch: aarch64_generic
runtime_test: true
- arch: arm_arm1176jzf-s_vfp
runtime_test: false
- arch: arm_arm926ej-s
runtime_test: false
- arch: arm_cortex-a15_neon-vfpv4
runtime_test: true
- arch: arm_cortex-a5_vfpv4
runtime_test: false
- arch: arm_cortex-a7
runtime_test: false
- arch: arm_cortex-a7_neon-vfpv4
runtime_test: false
- arch: arm_cortex-a8_vfpv3
runtime_test: false
- arch: arm_cortex-a9
runtime_test: false
- arch: arm_cortex-a9_neon
runtime_test: false
- arch: arm_cortex-a9_vfpv3-d16
runtime_test: false
- arch: arm_fa526
runtime_test: false
- arch: arm_mpcore
runtime_test: false
- arch: arm_xscale
runtime_test: false
- arch: i386_pentium-mmx
runtime_test: true
- arch: i386_pentium4
runtime_test: false
- arch: mips64_octeonplus
runtime_test: false
- arch: mips_24kc
runtime_test: true
- arch: mips_4kec
runtime_test: false
- arch: mips_mips32
runtime_test: false
- arch: mipsel_24kc
runtime_test: false
- arch: mipsel_24kc_24kf
runtime_test: false
- arch: mipsel_74kc
runtime_test: false
- arch: mipsel_mips32
runtime_test: false
- arch: riscv64_riscv64
runtime_test: false
- arch: x86_64
runtime_test: true
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Build
uses: immortalwrt/gh-action-sdk@v4
env:
ARCH: ${{ matrix.arch }}
FEEDNAME: v2raya_ci
PACKAGES: ca-certificates v2fly-geodata v2ray-core xray-core v2raya luci-app-v2raya
NO_REFRESH_CHECK: 1
- name: Generate metadata
env:
BUILD_ARCH: ${{ matrix.arch }}
DEBIAN_FRONTEND: noninteractive
USIGN_KEY: ${{ secrets.USIGN_KEY }}
run: |
sudo -H apt -qq install signify-openbsd
sudo -H chown -R runner:runner bin
./scripts/generate_index.sh
- name: Upload feed
uses: Pendect/action-rsyncer@8e05ffa5c93e5d9c9b167796b26044d2c616b2b9
with:
flags: '-ahvHP'
options: '--delete'
src: 'bin/packages/${{ matrix.arch }}/v2raya_ci/'
dest: '${{ secrets.SF_USER }}@frs.sourceforge.net:/home/frs/project/v2raya/openwrt/${{ matrix.arch }}/'
env:
DEPLOY_KEY: ${{ secrets.SF_KEY }}
- name: Move created packages to project dir
run: cp bin/packages/${{ matrix.arch }}/v2raya_ci/*.ipk . || true
- name: Store packages
uses: actions/upload-artifact@v3
if: github.event_name != 'release'
with:
name: ${{ matrix.arch }}-${{ github.sha }}-packages
path: "*.ipk"
- name: Release packages
uses: svenstaro/upload-release-action@7319e4733ec7a184d739a6f412c40ffc339b69c7
if: github.event_name == 'release'
with:
overwrite: true
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file: "*.ipk"
file_glob: true
- name: Store logs
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.arch }}-${{ github.sha }}-logs
path: logs/
- name: Remove logs
run: sudo rm -rf logs/ || true
- name: Register QEMU
if: ${{ matrix.runtime_test }}
run: |
sudo apt-get update
sudo apt-get install -y qemu-user-static binfmt-support
sudo update-binfmts --import
- name: Build Docker container
if: ${{ matrix.runtime_test }}
run: |
docker build -t test-container --build-arg ARCH .github/workflows/
env:
ARCH: ${{ matrix.arch }}
- name: Test via Docker container
if: ${{ matrix.runtime_test }}
run: |
docker run --rm -v $GITHUB_WORKSPACE:/ci test-container