8 name: Test ${{ matrix.arch }}
15 - arm_cortex-a9_vfpv3-d16
21 - arch: aarch64_cortex-a53
23 - arch: arm_cortex-a15_neon-vfpv4
25 - arch: i386_pentium-mmx
31 - uses: actions/checkout@v2
35 - name: Determine changed packages
37 # only detect packages with changed Makefiles
38 PACKAGES="$(git diff --diff-filter=d --name-only origin/master \
39 | grep -E 'Makefile$|test.sh$' | grep -Ev '/files/|/src/' \
40 | awk -F/ '{ print $(NF-1) }' | tr '\n' ' ')"
42 # fallback to test packages if nothing explicitly changes this is
43 # should run if other mechanics in packages.git changed
44 PACKAGES="${PACKAGES:-vim tmux bmon}"
46 echo "Building $PACKAGES"
47 echo "PACKAGES=$PACKAGES" >> $GITHUB_ENV
49 - name: Determine branch name
51 BRANCH="${GITHUB_BASE_REF#refs/heads/}"
52 echo "Building for $BRANCH"
53 echo "BRANCH=$BRANCH" >> $GITHUB_ENV
56 uses: openwrt/gh-action-sdk@v1
58 ARCH: ${{ matrix.arch }}-${{ env.BRANCH }}
61 - name: Move created packages to project dir
62 run: cp bin/packages/${{ matrix.arch }}/packages_ci/*.ipk . || true
64 - name: Store packages
65 uses: actions/upload-artifact@v2
67 name: ${{ matrix.arch}}-packages
71 uses: actions/upload-artifact@v2
73 name: ${{ matrix.arch}}-logs
77 run: sudo rm -rf logs/ || true
80 if: ${{ matrix.runtime_test }}
82 sudo docker run --rm --privileged aptman/qus -s -- -p
84 - name: Build Docker container
85 if: ${{ matrix.runtime_test }}
87 docker build -t test-container --build-arg ARCH .github/workflows/
89 ARCH: ${{ matrix.arch }}
91 - name: Test via Docker container
92 if: ${{ matrix.runtime_test }}
94 docker run --rm -v $GITHUB_WORKSPACE:/ci test-container