Simptest #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Simptest | |
on: | |
workflow_dispatch: | |
inputs: | |
PACKAGES: | |
required: true | |
type: string | |
OP_VERSION: | |
required: true | |
default: '23.05.5' | |
type: string | |
BOARD: | |
required: true | |
default: 'x86' | |
type: string | |
SUBTARGET: | |
required: true | |
default: '64' | |
type: string | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write # To push a branch | |
steps: | |
- name: Initialize Environment | |
env: | |
DEBIAN_FRONTEND: noninteractive | |
shell: bash | |
run: | | |
sudo apt update | |
sudo apt -y install axel build-essential ccache clang curl flex bison g++ gawk \ | |
gcc-multilib g++-multilib genisoimage gettext git libdw-dev libelf-dev \ | |
libncurses5-dev libssl-dev locales pv pwgen python3 python3-pip \ | |
python3-setuptools qemu-utils rsync signify-openbsd subversion swig unzip \ | |
zlib1g-dev file wget zstd python3-pyelftools \ | |
clang llvm libbpf-dev pkg-config libdw-dev libelf-dev zlib1g-dev | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.ref_name }} | |
lfs: true | |
submodules: true | |
- name: mkdir WORKDIR | |
shell: bash | |
run: | | |
mkdir -p WORKDIR | |
- name: Do Something | |
id: do_something | |
shell: bash | |
run: | | |
group() { | |
endgroup | |
echo "::group:: $1" | |
GROUP=1 | |
} | |
endgroup() { | |
if [ -n "$GROUP" ]; then | |
echo "::endgroup::" | |
fi | |
GROUP= | |
} | |
trap 'endgroup' ERR | |
cd WORKDIR | |
# | |
group "Download SDK" | |
axel -q -n8 https://downloads.openwrt.org/snapshots/targets/x86/64/openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
tar -I zstd -xf openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst && rm -f openwrt-sdk-x86-64_gcc-13.3.0_musl.Linux-x86_64.tar.zst | |
mv *-sdk-* SDK | |
endgroup | |
cd SDK | |
group "clone fantastic-packages" | |
umask 022 | |
git clone --depth 1 --branch snapshot --single-branch --no-tags --recurse-submodules https://github.com/fantastic-packages/packages package/fantastic_packages | |
endgroup | |
# | |
group "scripts/feeds update -a" | |
scripts/feeds update -a | |
endgroup | |
# | |
group "scripts/feeds install -a" | |
scripts/feeds install -a | |
endgroup | |
# | |
group "make defconfig" | |
make defconfig | |
endgroup | |
# | |
group "make package/*/compile V=s -j$NPROC" | |
for PKG in einat-ebpf rgmac alwaysonline; do | |
make "package/$PKG/compile" \ | |
BUILD_LOG=y \ | |
IGNORE_ERRORS="$IGNORE_ERRORS" \ | |
CONFIG_AUTOREMOVE=y \ | |
-j$(nproc) | |
done | |
endgroup | |
# | |
group "make package/index V=s" | |
make package/index V=s | |
endgroup | |
# Build done | |
- name: Setup tmate session | |
if: ${{ failure() && steps.do_something.conclusion == 'failure' }} | |
uses: mxschmitt/action-tmate@v3 | |
- name: Upload WORKDIR | |
if: ${{ failure() && steps.do_something.conclusion == 'failure' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: do_something-${{ hashFiles('**/Makefile') }} | |
path: ${{ github.workspace }}/WORKDIR/SDK/logs | |
compression-level: 9 | |
include-hidden-files: true |