Skip to content

Commit

Permalink
added error logging
Browse files Browse the repository at this point in the history
  • Loading branch information
mariotaku committed Mar 4, 2024
1 parent 34a7fbc commit ab81d41
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
16 changes: 12 additions & 4 deletions .github/actions/build-toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ runs:
sudo apt-get update -y
sudo apt-get install -y gcc-12 g++-12
- name: Set Parallel Level (macOS)
- name: Set parallel level (macOS)
if: inputs.os == 'darwin'
shell: bash
run: echo "CMAKE_BUILD_PARALLEL_LEVEL=$(sysctl -n hw.logicalcpu)" >> $GITHUB_ENV

- name: Set Parallel Level
- name: Set parallel level (Linux)
if: inputs.os == 'linux'
shell: bash
run: echo "CMAKE_BUILD_PARALLEL_LEVEL=$(nproc)" >> $GITHUB_ENV
Expand All @@ -50,6 +50,7 @@ runs:
LANG: 'en_US.UTF-8'

- name: Build
id: build
shell: bash
run: cmake --build ${{github.workspace}}/build --config ${{inputs.build-type}}
env:
Expand All @@ -59,7 +60,14 @@ runs:
shell: bash
run: cmake --install ${{github.workspace}}/build

- name: Set Output
- name: Set output
id: set-output
shell: bash
run: echo "install-prefix=${{github.workspace}}/build/dist/arm-webos-linux-gnueabi_sdk-buildroot" >> "$GITHUB_OUTPUT"
run: echo "install-prefix=${{github.workspace}}/build/dist/arm-webos-linux-gnueabi_sdk-buildroot" >> "$GITHUB_OUTPUT"

- name: Upload build logs
uses: actions/upload-artifact@v4
if: ${{ failure() && steps.build.conclusion == 'failure' }}
with:
name: build-toolchains-logs-${{ matrix.os }}-${{ matrix.arch }}-${{ github.run_id }}
path: build/**/*.log
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ on:

jobs:
machine-select:
name: Select Build Machine
name: Select build machine
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.result }}
Expand Down Expand Up @@ -43,15 +43,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: Build Toolchain
- name: Build toolchain
id: build-toolchain
uses: './.github/actions/build-toolchain'
with:
machine: ${{ matrix.machine }}
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}

- name: Make Tarball
- name: Make tarball
run: |
cmake -E tar cjvf ${ARTIFACT_NAME} arm-webos-linux-gnueabi_sdk-buildroot
working-directory: ${{steps.build-toolchain.outputs.install-prefix}}

0 comments on commit ab81d41

Please sign in to comment.