2022-02-25 11:28:46 +00:00
|
|
|
name: Build host tools
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
paths:
|
|
|
|
- 'tools/**'
|
2022-12-09 17:09:32 +00:00
|
|
|
- '.github/workflows/build-tools.yml'
|
2022-03-30 00:43:17 +00:00
|
|
|
- '.github/workflows/tools.yml'
|
2022-08-08 21:37:54 +00:00
|
|
|
push:
|
|
|
|
paths:
|
|
|
|
- 'tools/**'
|
2022-12-09 17:09:32 +00:00
|
|
|
- '.github/workflows/build-tools.yml'
|
2022-08-08 21:37:54 +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
|
|
|
|
|
2023-01-11 12:52:38 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
|
|
|
|
2022-02-25 11:28:46 +00:00
|
|
|
jobs:
|
2022-03-20 20:02:08 +00:00
|
|
|
build-macos-latest:
|
2022-12-09 17:09:32 +00:00
|
|
|
name: Build tools with macos latest
|
2022-03-20 20:02:08 +00:00
|
|
|
runs-on: macos-latest
|
|
|
|
|
2022-02-25 11:28:46 +00:00
|
|
|
steps:
|
|
|
|
- name: Checkout
|
2022-10-12 13:24:11 +00:00
|
|
|
uses: actions/checkout@v3
|
2022-02-25 11:28:46 +00:00
|
|
|
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 \
|
|
|
|
automake \
|
|
|
|
coreutils \
|
|
|
|
diffutils \
|
|
|
|
findutils \
|
|
|
|
gawk \
|
|
|
|
git-extras \
|
|
|
|
gnu-sed \
|
|
|
|
grep \
|
2023-01-08 20:05:29 +00:00
|
|
|
make
|
2022-02-25 11:28:46 +00:00
|
|
|
|
|
|
|
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()
|
2022-10-12 14:48:46 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-03-20 20:02:08 +00:00
|
|
|
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-10-12 14:48:46 +00:00
|
|
|
uses: actions/upload-artifact@v3
|
2022-03-20 20:02:08 +00:00
|
|
|
with:
|
|
|
|
name: macos-latest-config
|
|
|
|
path: ${{ env.WORKPATH }}/openwrt/.config
|
|
|
|
|
|
|
|
build-linux-buildbot:
|
2022-12-09 17:09:32 +00:00
|
|
|
name: Build tools with buildbot container
|
|
|
|
uses: ./.github/workflows/build-tools.yml
|