Skip to content

Commit

Permalink
ARM CI
Browse files Browse the repository at this point in the history
Enable CI for Mali iGPU
  • Loading branch information
pvelesko committed Aug 6, 2024
1 parent 8f59383 commit 39006e7
Show file tree
Hide file tree
Showing 6 changed files with 189 additions and 131 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/check-unit-tests-arm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Workflow syntax:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: unit-test-checker-arm

on:
pull_request:
paths-ignore: "docs/**"

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
unit-tests-llvm-18-release-salami:
runs-on: ARM64
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh release llvm-18
shell: bash
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Workflow syntax:
# https://help.github.com/en/articles/workflow-syntax-for-github-actions
name: unit-test-checker
name: unit-test-checker-intel

on:
pull_request:
Expand All @@ -11,83 +11,69 @@ concurrency:
cancel-in-progress: true

jobs:
unit-tests-llvm-15-debug:
runs-on: X64
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Run unit test checking script
run: ./scripts/unit_tests.sh debug llvm-15
shell: bash
unit-tests-llvm-15-release:
runs-on: X64
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
- name: Run unit test checking script
run: ./scripts/unit_tests.sh release llvm-15
shell: bash
unit-tests-llvm-16-debug:
runs-on: X64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh debug llvm-16
shell: bash
unit-tests-llvm-16-release:
runs-on: X64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh release llvm-16
shell: bash
unit-tests-llvm-17-debug:
runs-on: X64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh debug llvm-17
shell: bash
unit-tests-llvm-17-release:
runs-on: X64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh release llvm-17
shell: bash
unit-tests-llvm-18-debug:
runs-on: X64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh debug llvm-18
shell: bash
unit-tests-llvm-18-release:
runs-on: X64
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
submodules: 'recursive'
- name: Run unit test checking script
run: ./scripts/unit_tests.sh release llvm-18
shell: bash
shell: bash
50 changes: 26 additions & 24 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,46 +8,48 @@ on:

jobs:
build:
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
runs-on: [self-hosted, Linux, X64]
steps:
- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Build latest image
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./docker/DockerfileLatest
push: false
tags: pveleskopglc/chipstar:latest
outputs: type=docker,dest=/tmp/chipstar-latest.tar
tags: pveleskopglc/chipstar:pr-${{ github.event.number }}

- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: chipstar-latest
path: /tmp/chipstar-latest.tar

publish:
push:
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: build
runs-on: ubuntu-latest
runs-on: [self-hosted, Linux, X64]
steps:
- name: Download artifact
uses: actions/download-artifact@v3
with:
name: chipstar-latest
path: /tmp

- name: Load Docker image
run: docker load --input /tmp/chipstar-latest.tar

- uses: actions/checkout@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Push latest image
run: docker push pveleskopglc/chipstar:latest

- name: Tag and push Docker image
run: |
docker tag pveleskopglc/chipstar:pr-${{ github.event.number }} pveleskopglc/chipstar:latest
docker push pveleskopglc/chipstar:latest

cleanup:
needs: [build, push]
runs-on: [self-hosted, Linux, X64]
steps:
- name: Clean up old Docker images
run: |
docker rmi $(docker images -q pveleskopglc/chipstar:pr-${{ github.event.number }})
13 changes: 11 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,17 @@ if(CHIP_VERBOSE)
endif()

string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)

if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "The build type to use Debug, Release, RelWithDebInfo, MinRelSize" FORCE)
elseif(uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASE")
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The build type to use Debug, Release, RelWithDebInfo, MinRelSize" FORCE)
elseif(uppercase_CMAKE_BUILD_TYPE STREQUAL "RELEASEWITHDEBINFO")
set(CMAKE_BUILD_TYPE "RelWithDebInfo" CACHE STRING "The build type to use Debug, Release, RelWithDebInfo, MinRelSize" FORCE)
elseif(uppercase_CMAKE_BUILD_TYPE STREQUAL "MINRELSIZE")
set(CMAKE_BUILD_TYPE "MinRelSize" CACHE STRING "The build type to use Debug, Release, RelWithDebInfo, MinRelSize" FORCE)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-Wall)
list(APPEND CHIP_SPV_DEFINITIONS SPDLOG_ACTIVE_LEVEL=SPDLOG_LEVEL_TRACE)
else()
Expand Down Expand Up @@ -590,7 +599,7 @@ set(CHIP_INSTALL_DIR ${CMAKE_INSTALL_PREFIX})
set(CHIP_CLANG_PATH ${CLANG_BIN_PATH})
set(CHIP_DEFAULT_WARP_SIZE ${DEFAULT_WARP_SIZE})
set(CHIP_DEBUG_BUILD 0)
if(uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
set(CHIP_DEBUG_BUILD 1)
endif()
configure_file(chipStarConfig.hh.in include/chipStarConfig.hh @ONLY)
Expand Down
Loading

0 comments on commit 39006e7

Please sign in to comment.