Skip to content

Commit

Permalink
CI debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
plvines committed Dec 11, 2024
1 parent b73c9f3 commit f1af781
Showing 1 changed file with 110 additions and 73 deletions.
183 changes: 110 additions & 73 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit f1af781

Please sign in to comment.