actions: set BUILD_LOG=1 and store logs as artifacts

The new step is added with `if: ${{ !cancelled() }}`, so the logs are
stored even when the build fails.
This commit is contained in:
Matthias Schiffer 2020-05-12 10:44:18 +02:00 committed by David Bauer
parent ab6596115a
commit 2889904e5f
3 changed files with 169 additions and 25 deletions

View File

@ -22,10 +22,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ar71xx-generic run: bash contrib/actions/run-build.sh ar71xx-generic
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ar71xx-generic_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ar71xx-generic name: ar71xx-generic_output
path: output path: output
ar71xx-tiny: ar71xx-tiny:
@ -37,10 +43,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ar71xx-tiny run: bash contrib/actions/run-build.sh ar71xx-tiny
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ar71xx-tiny_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ar71xx-tiny name: ar71xx-tiny_output
path: output path: output
ar71xx-nand: ar71xx-nand:
@ -52,10 +64,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ar71xx-nand run: bash contrib/actions/run-build.sh ar71xx-nand
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ar71xx-nand_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ar71xx-nand name: ar71xx-nand_output
path: output path: output
ath79-generic: ath79-generic:
@ -67,10 +85,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ath79-generic run: bash contrib/actions/run-build.sh ath79-generic
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ath79-generic_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ath79-generic name: ath79-generic_output
path: output path: output
brcm2708-bcm2708: brcm2708-bcm2708:
@ -82,10 +106,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh brcm2708-bcm2708 run: bash contrib/actions/run-build.sh brcm2708-bcm2708
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: brcm2708-bcm2708_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: brcm2708-bcm2708 name: brcm2708-bcm2708_output
path: output path: output
brcm2708-bcm2709: brcm2708-bcm2709:
@ -97,10 +127,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh brcm2708-bcm2709 run: bash contrib/actions/run-build.sh brcm2708-bcm2709
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: brcm2708-bcm2709_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: brcm2708-bcm2709 name: brcm2708-bcm2709_output
path: output path: output
ipq40xx-generic: ipq40xx-generic:
@ -112,10 +148,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ipq40xx-generic run: bash contrib/actions/run-build.sh ipq40xx-generic
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ipq40xx-generic_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ipq40xx-generic name: ipq40xx-generic_output
path: output path: output
ipq806x-generic: ipq806x-generic:
@ -127,10 +169,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ipq806x-generic run: bash contrib/actions/run-build.sh ipq806x-generic
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ipq806x-generic_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ipq806x-generic name: ipq806x-generic_output
path: output path: output
lantiq-xrx200: lantiq-xrx200:
@ -142,10 +190,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh lantiq-xrx200 run: bash contrib/actions/run-build.sh lantiq-xrx200
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: lantiq-xrx200_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: lantiq-xrx200 name: lantiq-xrx200_output
path: output path: output
lantiq-xway: lantiq-xway:
@ -157,10 +211,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh lantiq-xway run: bash contrib/actions/run-build.sh lantiq-xway
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: lantiq-xway_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: lantiq-xway name: lantiq-xway_output
path: output path: output
mpc85xx-generic: mpc85xx-generic:
@ -172,10 +232,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh mpc85xx-generic run: bash contrib/actions/run-build.sh mpc85xx-generic
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: mpc85xx-generic_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: mpc85xx-generic name: mpc85xx-generic_output
path: output path: output
mpc85xx-p1020: mpc85xx-p1020:
@ -187,10 +253,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh mpc85xx-p1020 run: bash contrib/actions/run-build.sh mpc85xx-p1020
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: mpc85xx-p1020_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: mpc85xx-p1020 name: mpc85xx-p1020_output
path: output path: output
ramips-mt7620: ramips-mt7620:
@ -202,10 +274,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ramips-mt7620 run: bash contrib/actions/run-build.sh ramips-mt7620
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ramips-mt7620_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ramips-mt7620 name: ramips-mt7620_output
path: output path: output
ramips-mt7621: ramips-mt7621:
@ -217,10 +295,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ramips-mt7621 run: bash contrib/actions/run-build.sh ramips-mt7621
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ramips-mt7621_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ramips-mt7621 name: ramips-mt7621_output
path: output path: output
ramips-mt76x8: ramips-mt76x8:
@ -232,10 +316,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ramips-mt76x8 run: bash contrib/actions/run-build.sh ramips-mt76x8
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ramips-mt76x8_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ramips-mt76x8 name: ramips-mt76x8_output
path: output path: output
ramips-rt305x: ramips-rt305x:
@ -247,10 +337,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ramips-rt305x run: bash contrib/actions/run-build.sh ramips-rt305x
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ramips-rt305x_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ramips-rt305x name: ramips-rt305x_output
path: output path: output
sunxi-cortexa7: sunxi-cortexa7:
@ -262,10 +358,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh sunxi-cortexa7 run: bash contrib/actions/run-build.sh sunxi-cortexa7
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: sunxi-cortexa7_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: sunxi-cortexa7 name: sunxi-cortexa7_output
path: output path: output
x86-generic: x86-generic:
@ -277,10 +379,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh x86-generic run: bash contrib/actions/run-build.sh x86-generic
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: x86-generic_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: x86-generic name: x86-generic_output
path: output path: output
x86-geode: x86-geode:
@ -292,10 +400,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh x86-geode run: bash contrib/actions/run-build.sh x86-geode
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: x86-geode_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: x86-geode name: x86-geode_output
path: output path: output
x86-64: x86-64:
@ -307,10 +421,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh x86-64 run: bash contrib/actions/run-build.sh x86-64
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: x86-64_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: x86-64 name: x86-64_output
path: output path: output
ar71xx-mikrotik: ar71xx-mikrotik:
@ -322,10 +442,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh ar71xx-mikrotik run: bash contrib/actions/run-build.sh ar71xx-mikrotik
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: ar71xx-mikrotik_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: ar71xx-mikrotik name: ar71xx-mikrotik_output
path: output path: output
brcm2708-bcm2710: brcm2708-bcm2710:
@ -337,10 +463,16 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh brcm2708-bcm2710 run: bash contrib/actions/run-build.sh brcm2708-bcm2710
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: brcm2708-bcm2710_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: brcm2708-bcm2710 name: brcm2708-bcm2710_output
path: output path: output
mvebu-cortexa9: mvebu-cortexa9:
@ -352,9 +484,15 @@ jobs:
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh mvebu-cortexa9 run: bash contrib/actions/run-build.sh mvebu-cortexa9
- name: Archive build logs
if: ${{ !cancelled() }}
uses: actions/upload-artifact@v1
with:
name: mvebu-cortexa9_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: mvebu-cortexa9 name: mvebu-cortexa9_output
path: output path: output

View File

@ -28,10 +28,16 @@ ACTIONS_TARGET="""
run: bash contrib/actions/install-dependencies.sh run: bash contrib/actions/install-dependencies.sh
- name: Build - name: Build
run: bash contrib/actions/run-build.sh {target_name} run: bash contrib/actions/run-build.sh {target_name}
- name: Archive build logs
if: ${{{{ !cancelled() }}}}
uses: actions/upload-artifact@v1
with:
name: {target_name}_logs
path: openwrt/logs
- name: Archive build output - name: Archive build output
uses: actions/upload-artifact@v1 uses: actions/upload-artifact@v1
with: with:
name: {target_name} name: {target_name}_output
path: output path: output
""" """

View File

@ -5,7 +5,7 @@ export GLUON_AUTOREMOVE=1
export GLUON_DEPRECATED=1 export GLUON_DEPRECATED=1
export GLUON_SITEDIR="contrib/ci/minimal-site" export GLUON_SITEDIR="contrib/ci/minimal-site"
export GLUON_TARGET=$1 export GLUON_TARGET=$1
export BUILD_LOG=1
make update make update
make -j2 V=s make -j2 V=s