From 20642f8122ae1b3646f1722e1fc69e1cd52f9fe1 Mon Sep 17 00:00:00 2001 From: Scott Harrison Moeller Date: Fri, 12 Mar 2021 17:25:38 -0500 Subject: [PATCH] Change working directory for Docker build An attempt to use learnings from here: https://github.com/actions/runner/issues/1009 --- .github/workflows/gcc-problems.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/gcc-problems.yml b/.github/workflows/gcc-problems.yml index 3fe92cf8bee06..ae4be0140dd35 100644 --- a/.github/workflows/gcc-problems.yml +++ b/.github/workflows/gcc-problems.yml @@ -64,6 +64,10 @@ jobs: runs-on: ubuntu-latest needs: gen_build_container steps: + - + # TODO: Is this is necessary for overlays into the Docker container below? + name: Check Out Repo + uses: actions/checkout@v2 - # I am using mmagician fork of get-changed-files (forked from jitterbit/get-changed-files) # Rationale: our workflow (merge branch into upstream master) is incompatible @@ -73,9 +77,6 @@ jobs: uses: mmagician/get-changed-files@v2 with: format: 'space-delimited' - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - name: Download docker image from generate_container_for_build uses: actions/download-artifact@v2 @@ -93,17 +94,28 @@ jobs: # Additional GH Issues regarding paths for monorepos without root build. # - https://github.com/actions/runner/issues/659 # - https://github.com/actions/runner/issues/765 + # + # Paths emitted on warnings must be relative to the repository (e.g. lte/gateway/...), + # Therefore below I use `xo` to fixup our path emissions on gcc warnings. uses: electronjoe/gcc-problem-matcher@v1 - name: Build and Apply GCC Problem Matcher uses: addnab/docker-run-action@v2 with: image: magma/mme_builder:latest - # TODO: Break up this long line (can I use '\' at end of each line?) - run: cd /magma/lte/gateway;make build_oai 2>&1 > /compile.log;for file in ${{ steps.changed_files.outputs.all }}; do grep $file /compile.log | xo '/\/magma\/((.*):(\d+):(\d+):\s+(?:fatal\s)?(warning|error):\s+(.*))/$1/' || true; done; + # TODO: Remove work-around mount to /work (https://github.com/addnab/docker-run-action/issues/11) + options: -v ${{ github.workspace }}:/work -e ABC=123 + run: | + echo "Github Workspace SHM: $GITHUB_WORKSPACE" + ls -R /github/ + cd /work/lte/gateway/ + make build_oai 2>&1 > /work/compile.log + for file in ${{ steps.changed_files.outputs.all }}; + do grep $file /work/compile.log | xo '/\/magma\/((.*):(\d+):(\d+):\s+(?:fatal\s)?(warning|error):\s+(.*))/$1/' || true; + done; - name: Store oai_build_logs artifact uses: actions/upload-artifact@v2 with: name: oai_build_logs - path: /compile.log + path: ${{ github.workspace }}/compile.log