mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2024-12-22 14:43:30 +00:00
CI: usability improvements for tools
* Always store build logs * Store .config as an artifact * Rename job to `tools-{ os }` for log archive without spaces * Run CI job on changes to the CI file itself Signed-off-by: Paul Spooren <mail@aparcar.org>
This commit is contained in:
parent
39ec9edacb
commit
80f79beb95
16
.github/workflows/tools.yml
vendored
16
.github/workflows/tools.yml
vendored
@ -4,10 +4,11 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
paths:
|
paths:
|
||||||
- 'tools/**'
|
- 'tools/**'
|
||||||
|
- '.github/workflows/tools.yml'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build tools on ${{ matrix.os }}
|
name: tools-${{ matrix.os }}
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: False
|
fail-fast: False
|
||||||
@ -122,13 +123,22 @@ jobs:
|
|||||||
make tools/install -j$(nproc) BUILD_LOG=1
|
make tools/install -j$(nproc) BUILD_LOG=1
|
||||||
|
|
||||||
- name: Move logs to GITHUB_WORKSPACE
|
- name: Move logs to GITHUB_WORKSPACE
|
||||||
if: failure()
|
if: always()
|
||||||
run: |
|
run: |
|
||||||
cp -r "$WORKPATH/logs" "$GITHUB_WORKSPACE"
|
cp -r "$WORKPATH/logs" "$GITHUB_WORKSPACE"
|
||||||
|
cp -r "$WORKPATH/.config" "$GITHUB_WORKSPACE/config"
|
||||||
|
|
||||||
|
|
||||||
- name: Upload logs
|
- name: Upload logs
|
||||||
if: failure()
|
if: always()
|
||||||
uses: actions/upload-artifact@v2
|
uses: actions/upload-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.os }}-logs
|
name: ${{ matrix.os }}-logs
|
||||||
path: "logs"
|
path: "logs"
|
||||||
|
|
||||||
|
- name: Upload config
|
||||||
|
if: always()
|
||||||
|
uses: actions/upload-artifact@v2
|
||||||
|
with:
|
||||||
|
name: ${{ matrix.os }}-config
|
||||||
|
path: "config"
|
||||||
|
Loading…
Reference in New Issue
Block a user