Skip to content

test

test #96

Workflow file for this run

name: Auto release
on:
push:
jobs:
# build:
# name: Build / ${{ matrix.branch }} / ${{ matrix.arch }}
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# branch:
# - openwrt-19.07
# - openwrt-21.02
# - openwrt-22.03
# - openwrt-23.05
# - master
# # - snapshot
# arch:
# # - aarch64_cortex-a53
# # - aarch64_cortex-a72
# - aarch64_generic
# # # - arc_arc700
# # # - arc_archs
# # - arm_arm1176jzf-s_vfp
# # - arm_arm926ej-s
# # - arm_cortex-a15_neon-vfpv4
# # - arm_cortex-a5_vfpv4
# # - arm_cortex-a7
# # - arm_cortex-a7_neon-vfpv4
# # - arm_cortex-a8_vfpv3
# # - arm_cortex-a9
# # - arm_cortex-a9_neon
# # - arm_cortex-a9_vfpv3-d16
# # - arm_fa526
# # - arm_mpcore
# # - arm_xscale
# # - i386_pentium-mmx
# # - i386_pentium4
# # - mips64_octeonplus
# # - mips_24kc
# # - mips_4kec
# # - mips_mips32
# # - mipsel_24kc
# # - mipsel_24kc_24kf
# # - mipsel_74kc
# # - mipsel_mips32
# # - powerpc_464fp
# # - powerpc_8540
# - x86_64
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Build
# uses: openwrt/gh-action-sdk@v5
# env:
# ARCH: ${{ matrix.arch }}-${{ matrix.branch }}
# KEY_BUILD: ${{ secrets.KEY_BUILD }}
# - name: Upload artifacts
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.branch }}-${{ matrix.arch }}
# path: bin/packages/${{ matrix.arch }}/action/*
test:
name: Test / ${{ matrix.branch }} / ${{ matrix.arch }}
if: ${{ !cancelled() }}
# needs: [ build ]
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
branch:
- openwrt-19.07
- openwrt-21.02
- openwrt-22.03
- openwrt-23.05
- master
# - snapshot
arch:
# - aarch64_cortex-a53
- aarch64_generic
# - arm_cortex-a15_neon-vfpv4
# - arm_cortex-a9_vfpv3-d16
# # - armvirt-32
# # - armvirt-64
# - i386_pentium-mmx
# - i386_pentium4
# # - malta-be
# - mips_24kc
# # - x86-64
# # - x86-generic
# # - x86-geode
- x86_64
steps:
- name: Checkout
uses: actions/checkout@v3
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: ${{ matrix.branch }}-${{ matrix.arch }}
- name: Setup QEMU binfmt
run: |
sudo apt update
sudo apt install qemu-user-static
- name: Test via container
run: |
docker run --rm \
-v $GITHUB_WORKSPACE:/ci \
openwrt/rootfs:$TAG \
/ci/test.sh
env:
TAG: ${{ matrix.arch }}-${{ matrix.branch }}
# release:
# if: ${{ !cancelled() }}
# needs: [ test ]
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# path: artifacts/
# - name: Release
# run: |
# time="${{ github.event.head_commit.timestamp }}"
# sha="${GITHUB_SHA:0:8}"
# tag="ci-$(date +'%Y%m%d-%H%M' -d "$time")"
# message="Auto-Release $(date +'%Y-%m-%d %H:%M' -d "$time")"
# hub release create $(for a in artifacts/*/*.ipk; do echo -a $a; done) -t "$GITHUB_SHA" "$tag" -m "$message"
# env:
# GITHUB_TOKEN: ${{ github.token }}
# gh-pages:
# if: ${{ !cancelled() }}
# needs: [ test ]
# runs-on: ubuntu-latest
# permissions:
# contents: write
# steps:
# - name: Checkout pages
# uses: actions/checkout@v3
# with:
# path: 'gh-pages'
# ref: 'gh-pages'
# fetch-depth: 0
# - name: Configure the git user
# run: |
# git config --global user.name 'github-actions[bot]'
# git config --global user.email 'github-actions[bot]@users.noreply.github.com'
# - name: Drop old versions
# run: |
# cd gh-pages
# readarray -t old_version < <(git log --format='%h' -- "*/*/Packages" | tail -n +1)
# GIT_SEQUENCE_EDITOR="sed -i '1 i break'" git rebase -i --root
# for commit in "${old_version[@]}"; do
# sed -i "/${commit}/d" .git/rebase-merge/git-rebase-todo
# done
# git rebase --continue
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# path: artifacts/
# - name: Reorganize structure
# run: |
# for path in artifacts/*; do
# name="${path##*/}"
# version=$(echo "${name}" | cut -d'-' -f1)
# arch=$(echo "${name}" | cut -d'-' -f2-)
# mkdir -p "gh-pages/${version}/${arch}/"
# mv -v "${path}/"* "gh-pages/${version}/${arch}/"
# done
# - name: Commit
# run: |
# cd gh-pages
# git add .
# git commit -m "Add packages"
# - name: Publish
# run: |
# cd gh-pages
# git push -f origin gh-pages