From f1af781a6106f4512529693bdc33811eb423fc82 Mon Sep 17 00:00:00 2001 From: plvines <> Date: Tue, 10 Dec 2024 22:14:26 -0500 Subject: [PATCH] CI debugging --- .github/workflows/ci.yml | 183 +++++++++++++++++++++++---------------- 1 file changed, 110 insertions(+), 73 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e1182ec..37526ed 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,6 +15,43 @@ jobs: builder-image: runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Log in to Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 + with: + platforms: 'arm64,arm' + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v2 + + - name: Extract Docker Metadata + id: meta + uses: docker/metadata-action@v4 + with: + images: ghcr.io/${{ github.repository }}/race-sdk + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{raw}} + type=semver,pattern=v{{major}}.{{minor}} + type=semver,pattern=v{{major}} + + - name: Configure Docker Caching + id: cache + uses: int128/docker-build-cache-config-action@v1 + with: + image: ghcr.io/${{ github.repository }}/race-sdk/cache + - name: Build and Push raceboat-builder Docker Image uses: docker/build-push-action@v4 with: @@ -26,84 +63,84 @@ jobs: labels: ${{ steps.meta.outputs.labels }} cache-from: ${{ steps.cache.outputs.cache-from }} cache-to: ${{ steps.cache.outputs.cache-to }} - build: - runs-on: ubuntu-latest - container: - image: ghcr.io/tst-race/race-images/race-compile:main - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: Checkout - uses: actions/checkout@v3 + # build: + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/tst-race/race-images/race-compile:main + # credentials: + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + # steps: + # - name: Checkout + # uses: actions/checkout@v3 - - name: Build - run: ./build_it_all.sh + # - name: Build + # run: ./build_it_all.sh - - name: Build-pt - run: ./pluggable-transport/build.sh -p=build/LINUX_x86_64/language-shims/source/include/src/core + # - name: Build-pt + # run: ./pluggable-transport/build.sh -p=build/LINUX_x86_64/language-shims/source/include/src/core - - name: Create Build Artifact - # NOTE: _commsPluginBindings.so not in racesdk/package/ - run: "tar cvf ${{ github.event.repository.name }}.tar.gz -C racesdk/package/ ." + # - name: Create Build Artifact + # # NOTE: _commsPluginBindings.so not in racesdk/package/ + # run: "tar cvf ${{ github.event.repository.name }}.tar.gz -C racesdk/package/ ." - - name: Upload Build Artifact - uses: actions/upload-artifact@v3 - with: - name: "${{ github.event.repository.name }}-linux-x86_64.tar.gz" - path: "${{ github.event.repository.name }}-linux-x86_64.tar.gz" - retention-days: 10 + # - name: Upload Build Artifact + # uses: actions/upload-artifact@v3 + # with: + # name: "${{ github.event.repository.name }}-linux-x86_64.tar.gz" + # path: "${{ github.event.repository.name }}-linux-x86_64.tar.gz" + # retention-days: 10 - # todo base these on the raceboat image - test-unit: - # needs: build - runs-on: ubuntu-latest - container: - image: ghcr.io/tst-race/race-images/race-compile:main - credentials: - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} - steps: - - name: unit test - uses: actions/checkout@v3 + # # todo base these on the raceboat image + # test-unit: + # # needs: build + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/tst-race/race-images/race-compile:main + # credentials: + # username: ${{ github.actor }} + # password: ${{ secrets.GITHUB_TOKEN }} + # steps: + # - name: unit test + # uses: actions/checkout@v3 - - name: Build and Run Unit Tests - # shuffle the order of the tests to potentially uncover weirdness - # note that you can reproduce the test results by finding the seed in the log output and - # setting the environment variable GTEST_RANDOM_SEED to that value. - env: - GTEST_SHUFFLE: 1 - run: | - ./build_it_all.sh - cmake --build --preset=LINUX_x86_64 --target run_tests -j - test-coverage: - # needs: build - runs-on: ubuntu-latest - container: - image: ghcr.io/tst-race/race-images/race-compile:main - steps: - - name: Checkout - uses: actions/checkout@v3 + # - name: Build and Run Unit Tests + # # shuffle the order of the tests to potentially uncover weirdness + # # note that you can reproduce the test results by finding the seed in the log output and + # # setting the environment variable GTEST_RANDOM_SEED to that value. + # env: + # GTEST_SHUFFLE: 1 + # run: | + # ./build_it_all.sh + # cmake --build --preset=LINUX_x86_64 --target run_tests -j + # test-coverage: + # # needs: build + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/tst-race/race-images/race-compile:main + # steps: + # - name: Checkout + # uses: actions/checkout@v3 - - name: Build and Run Unit Tests - # shuffle the order of the tests to potentially uncover weirdness - # note that you can reproduce the test results by finding the seed in the log output and - # setting the environment variable GTEST_RANDOM_SEED to that value. - env: - GTEST_SHUFFLE: 1 - run: | - cmake --preset=coverage - cmake --build --preset=coverage --target coverage - test-format: - # needs: build - runs-on: ubuntu-latest - container: - image: ghcr.io/tst-race/race-images/race-compile:main - steps: - - name: Checkout - uses: actions/checkout@v3 + # - name: Build and Run Unit Tests + # # shuffle the order of the tests to potentially uncover weirdness + # # note that you can reproduce the test results by finding the seed in the log output and + # # setting the environment variable GTEST_RANDOM_SEED to that value. + # env: + # GTEST_SHUFFLE: 1 + # run: | + # cmake --preset=coverage + # cmake --build --preset=coverage --target coverage + # test-format: + # # needs: build + # runs-on: ubuntu-latest + # container: + # image: ghcr.io/tst-race/race-images/race-compile:main + # steps: + # - name: Checkout + # uses: actions/checkout@v3 - - name: Check Format - run: | - ./build_it_all.sh - cmake --build --preset=LINUX_x86_64 --target check_format -j + # - name: Check Format + # run: | + # ./build_it_all.sh + # cmake --build --preset=LINUX_x86_64 --target check_format -j