[openwrt/openwrt] CI: build changes in tools/ on ubuntu/macos
LEDE Commits
lede-commits at lists.infradead.org
Sun Dec 4 07:37:07 PST 2022
ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-21.02:
https://git.openwrt.org/9c4d81ec5e7340be08f4a0bae031bfee4e64bc14
commit 9c4d81ec5e7340be08f4a0bae031bfee4e64bc14
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Fri Feb 25 12:28:46 2022 +0100
CI: build changes in tools/ on ubuntu/macos
This commits adds GitHub CI to check that all tools compile on both
Ubuntu and macOS. Since running in parrallel this should also detect
badly set depdendencies within tools/Makefile.
Signed-off-by: Paul Spooren <mail at aparcar.org>
(cherry picked from commit fb830fd894f7ae5ad23f712ebf50808f8be2a1f7)
---
.github/workflows/tools.yml | 129 ++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 129 insertions(+)
diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml
new file mode 100644
index 0000000000..153db73625
--- /dev/null
+++ b/.github/workflows/tools.yml
@@ -0,0 +1,129 @@
+name: Build host tools
+
+on:
+ pull_request:
+ paths:
+ - 'tools/**'
+
+jobs:
+ build:
+ name: Build tools on ${{ matrix.os }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ fail-fast: False
+ matrix:
+ os:
+ - ubuntu-latest
+ - macos-latest
+ steps:
+ - name: Checkout
+ uses: actions/checkout at v2
+ with:
+ fetch-depth: 0
+ path: openwrt
+
+ - name: Setup MacOS
+ if: ${{ matrix.os == 'macos-latest' }}
+ run: |
+ echo "WORKPATH=/Volumes/OpenWrt/openwrt/" >> "$GITHUB_ENV"
+ hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
+ hdiutil attach OpenWrt.sparseimage
+ mv "$GITHUB_WORKSPACE/openwrt" /Volumes/OpenWrt/
+ cd "$WORKPATH"
+
+ brew install \
+ autoconf \
+ automake \
+ coreutils \
+ diffutils \
+ findutils \
+ gawk \
+ gettext \
+ git-extras \
+ gmp \
+ gnu-getopt \
+ gnu-sed \
+ gnu-tar \
+ grep \
+ libidn2 \
+ libunistring \
+ m4 \
+ make \
+ mpfr \
+ ncurses \
+ openssl at 1.1 \
+ pcre \
+ pkg-config \
+ quilt \
+ readline \
+ wget \
+ zstd
+
+ echo "/bin" >> "$GITHUB_PATH"
+ echo "/sbin/Library/Apple/usr/bin" >> "$GITHUB_PATH"
+ echo "/usr/bin" >> "$GITHUB_PATH"
+ echo "/usr/local/bin" >> "$GITHUB_PATH"
+ echo "/usr/local/opt/coreutils/bin" >> "$GITHUB_PATH"
+ echo "/usr/local/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
+ echo "/usr/local/opt/gettext/bin" >> "$GITHUB_PATH"
+ echo "/usr/local/opt/gnu-getopt/bin" >> "$GITHUB_PATH"
+ echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
+ echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
+ echo "/usr/sbin" >> "$GITHUB_PATH"
+ pwd
+
+ - name: Setup Ubuntu
+ if: ${{ matrix.os == 'ubuntu-latest' }}
+ env:
+ DEBIAN_FRONTEND: noninteractive
+ run: |
+ sudo apt-get update
+ sudo apt-get -y install \
+ build-essential \
+ ccache \
+ clang-12 \
+ ecj \
+ fastjar \
+ file \
+ g++ \
+ gawk \
+ gettext \
+ git \
+ java-propose-classpath \
+ libelf-dev \
+ libncurses-dev \
+ libssl-dev \
+ mkisofs \
+ python3 \
+ python3-dev \
+ python3-distutils \
+ python3-setuptools \
+ qemu-utils \
+ rsync \
+ subversion \
+ swig \
+ unzip \
+ wget \
+ xsltproc \
+ zlib1g-dev
+ echo "WORKPATH=$GITHUB_WORKSPACE/openwrt/" >> "$GITHUB_ENV"
+ cd "$WORKPATH"
+ pwd
+
+ - name: Make prereq
+ run: |
+ cd "$WORKPATH"
+ pwd
+ make defconfig
+
+ - name: Build tools
+ run: |
+ cd "$WORKPATH"
+ make tools/install -j$(nproc) BUILD_LOG=1
+
+ - name: Upload logs
+ if: failure()
+ uses: actions/upload-artifact at v2
+ with:
+ name: ${{ matrix.os }}-logs
+ path: "$WORKPATH/logs"
More information about the lede-commits
mailing list