2022-02-25 11:28:46 +00:00
|
|
|
name: Build host tools
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'tools/**'
|
2022-03-30 00:43:17 +00:00
|
|
|
- '.github/workflows/tools.yml'
|
2022-02-25 11:28:46 +00:00
|
|
|
|
2022-09-19 10:20:37 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-02-25 11:28:46 +00:00
|
|
|
jobs:
|
2022-03-20 20:02:08 +00:00
|
|
|
build-macos-latest:
|
|
|
|
runs-on: macos-latest
|
|
|
|
|
2022-02-25 11:28:46 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: openwrt
|
|
|
|
|
|
|
|
- name: Setup MacOS
|
|
|
|
run: |
|
2022-03-20 20:02:08 +00:00
|
|
|
echo "WORKPATH=/Volumes/OpenWrt" >> "$GITHUB_ENV"
|
2022-02-25 11:28:46 +00:00
|
|
|
hdiutil create -size 20g -type SPARSE -fs "Case-sensitive HFS+" -volname OpenWrt OpenWrt.sparseimage
|
|
|
|
hdiutil attach OpenWrt.sparseimage
|
|
|
|
mv "$GITHUB_WORKSPACE/openwrt" /Volumes/OpenWrt/
|
|
|
|
|
2022-03-20 20:02:08 +00:00
|
|
|
- name: Install required prereq on MacOS
|
|
|
|
working-directory: ${{ env.WORKPATH }}/openwrt
|
|
|
|
run: |
|
2022-02-25 11:28:46 +00:00
|
|
|
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@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"
|
|
|
|
|
|
|
|
- name: Make prereq
|
2022-03-20 20:02:08 +00:00
|
|
|
working-directory: ${{ env.WORKPATH }}/openwrt
|
|
|
|
run: make defconfig
|
2022-02-25 11:28:46 +00:00
|
|
|
|
2022-03-20 20:02:08 +00:00
|
|
|
- name: Build tools MacOS
|
|
|
|
working-directory: ${{ env.WORKPATH }}/openwrt
|
|
|
|
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
|
|
|
|
|
|
|
- name: Upload logs
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: macos-latest-logs
|
|
|
|
path: ${{ env.WORKPATH }}/openwrt/logs
|
2022-02-25 11:28:46 +00:00
|
|
|
|
2022-03-20 20:02:08 +00:00
|
|
|
- name: Upload config
|
2022-03-30 00:43:17 +00:00
|
|
|
if: always()
|
2022-03-20 20:02:08 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: macos-latest-config
|
|
|
|
path: ${{ env.WORKPATH }}/openwrt/.config
|
|
|
|
|
|
|
|
build-linux-buildbot:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
path: 'openwrt'
|
|
|
|
|
|
|
|
- name: Fix permission
|
2022-03-09 12:30:21 +00:00
|
|
|
run: |
|
2022-03-20 20:02:08 +00:00
|
|
|
chown -R buildbot:buildbot openwrt
|
|
|
|
|
|
|
|
- name: Make prereq
|
|
|
|
shell: su buildbot -c "sh -e {0}"
|
|
|
|
working-directory: openwrt
|
|
|
|
run: make defconfig
|
2022-03-30 00:43:17 +00:00
|
|
|
|
2022-03-20 20:02:08 +00:00
|
|
|
- name: Build tools BuildBot Container
|
|
|
|
shell: su buildbot -c "sh -e {0}"
|
|
|
|
working-directory: openwrt
|
|
|
|
run: make tools/install -j$(nproc) BUILD_LOG=1 || ret=$? .github/workflows/scripts/show_build_failures.sh
|
2022-03-09 12:30:21 +00:00
|
|
|
|
2022-02-25 11:28:46 +00:00
|
|
|
- name: Upload logs
|
2022-03-30 00:43:17 +00:00
|
|
|
if: always()
|
2022-02-25 11:28:46 +00:00
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-03-20 20:02:08 +00:00
|
|
|
name: linux-buildbot-logs
|
|
|
|
path: openwrt/logs
|
2022-03-30 00:43:17 +00:00
|
|
|
|
|
|
|
- name: Upload config
|
|
|
|
if: always()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
2022-03-20 20:02:08 +00:00
|
|
|
name: linux-buildbot-config
|
|
|
|
path: openwrt/.config
|