|
| 1 | +# Licensed under the Apache License, Version 2.0 (the "License"); |
| 2 | +# you may not use this file except in compliance with the License. |
| 3 | +# You may obtain a copy of the License at |
| 4 | +# |
| 5 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 6 | +# |
| 7 | +# Unless required by applicable law or agreed to in writing, software |
| 8 | +# distributed under the License is distributed on an "AS IS" BASIS, |
| 9 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 10 | +# See the License for the specific language governing permissions and |
| 11 | +# limitations under the License. |
| 12 | +# |
| 13 | +name: Build docker OOT |
| 14 | + |
| 15 | +on: |
| 16 | + workflow_dispatch: |
| 17 | + push: |
| 18 | + paths: |
| 19 | + - '.github/workflows/docker_oot.yml' |
| 20 | + |
| 21 | +permissions: |
| 22 | + contents: read |
| 23 | + |
| 24 | +concurrency: |
| 25 | + group: build-${{ github.event.pull_request.number || github.ref }} |
| 26 | + cancel-in-progress: true |
| 27 | + |
| 28 | +jobs: |
| 29 | + Fetch-Source: |
| 30 | + runs-on: ubuntu-latest |
| 31 | + steps: |
| 32 | + - name: Determine Target Branches |
| 33 | + id: gittargets |
| 34 | + shell: bash |
| 35 | + run: | |
| 36 | + OS_REF="" |
| 37 | + APPS_REF="" |
| 38 | + REF="refs/heads/master" |
| 39 | + echo "Working with ref: $REF" |
| 40 | + - name: Checkout nuttx repo |
| 41 | + uses: actions/checkout@v5 |
| 42 | + with: |
| 43 | + repository: trns1997/nuttx |
| 44 | + ref: nuttx-oot-build-test |
| 45 | + path: sources/nuttx |
| 46 | + fetch-depth: 1 |
| 47 | + - name: Checkout nuttx repo tags |
| 48 | + run: git -C sources/nuttx fetch --tags |
| 49 | + |
| 50 | + - name: Checkout apps repo |
| 51 | + uses: actions/checkout@v5 |
| 52 | + with: |
| 53 | + repository: trns1997/nuttx-apps |
| 54 | + ref: oot-build-test |
| 55 | + path: sources/apps |
| 56 | + fetch-depth: 1 |
| 57 | + |
| 58 | + - name: Tar sources |
| 59 | + run: tar zcf sources.tar.gz sources |
| 60 | + |
| 61 | + - name: Archive Source Bundle |
| 62 | + uses: actions/upload-artifact@v4 |
| 63 | + with: |
| 64 | + name: source-bundle |
| 65 | + path: sources.tar.gz |
| 66 | + Linux: |
| 67 | + needs: Fetch-Source |
| 68 | + runs-on: ubuntu-latest |
| 69 | + env: |
| 70 | + DOCKER_BUILDKIT: 1 |
| 71 | + steps: |
| 72 | + - name: Download Source Artifact |
| 73 | + uses: actions/download-artifact@v4 |
| 74 | + with: |
| 75 | + name: source-bundle |
| 76 | + path: . |
| 77 | + |
| 78 | + - name: Extract sources |
| 79 | + run: tar zxf sources.tar.gz |
| 80 | + |
| 81 | + - name: Docker Login |
| 82 | + uses: docker/login-action@v3 |
| 83 | + with: |
| 84 | + registry: ghcr.io |
| 85 | + username: ${{ github.actor }} |
| 86 | + password: ${{ secrets.GITHUB_TOKEN }} |
| 87 | + |
| 88 | + - name: Docker Pull |
| 89 | + run: docker pull ghcr.io/apache/nuttx/apache-nuttx-ci-linux |
| 90 | + |
| 91 | + - name: Export NuttX Repo SHA |
| 92 | + run: echo "nuttx_sha=`git -C sources/nuttx rev-parse HEAD`" >> $GITHUB_ENV |
| 93 | + |
| 94 | + - name: Run builds |
| 95 | + uses: ./sources/nuttx/.github/actions/ci-container |
| 96 | + env: |
| 97 | + BLOBDIR: /tools/blobs |
| 98 | + with: |
| 99 | + run: | |
| 100 | + echo "::add-matcher::sources/nuttx/.github/gcc.json" |
| 101 | + git config --global --add safe.directory /github/workspace/sources/nuttx |
| 102 | + git config --global --add safe.directory /github/workspace/sources/apps |
| 103 | + cd sources/nuttx |
| 104 | + ./tools/ci/cibuild-oot.sh |
| 105 | +
|
| 106 | + - uses: actions/upload-artifact@v4 |
| 107 | + if: ${{ always() }} |
| 108 | + with: |
| 109 | + name: linux-oot-builds |
| 110 | + path: sources/apps/testing/cxx-oot-build |
| 111 | + continue-on-error: true |
0 commit comments