Skip to content

Commit d9808ea

Browse files
pr-test-new-2
1 parent 89b9916 commit d9808ea

1 file changed

Lines changed: 60 additions & 4 deletions

File tree

.github/workflows/test-pr-new.yaml

Lines changed: 60 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
name: Check a pull request
22

3-
# on:
4-
# push:
5-
# branches:
6-
# - 'new_build_image_test'
3+
on:
4+
push:
5+
branches:
6+
- 'new_build_image_test'
77

88
jobs:
99
build_linux:
@@ -75,3 +75,59 @@ jobs:
7575
uses: asarium/clang-tidy-action@v1
7676
with:
7777
fixesFile: clang-fixes.yaml
78+
79+
build_mac:
80+
strategy:
81+
matrix:
82+
configuration: [Debug, Release]
83+
compiler: [clang]
84+
arch: [x86_64, arm64]
85+
cmake_options: [""]
86+
name: Mac
87+
runs-on: macos-latest
88+
steps:
89+
- uses: actions/checkout@v7
90+
name: Checkout
91+
with:
92+
submodules: true
93+
fetch-depth: 0
94+
- name: Set workspace as safe
95+
# This appears to be broken in current actions, so do it manually
96+
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
97+
- name: ccache
98+
uses: hendrikmuhs/ccache-action@v1.2.23
99+
with:
100+
key: ${{ runner.os }}-${{ matrix.configuration }}-${{ matrix.compiler }}-${{ matrix.arch }}
101+
save: false # Caches are created by a separate job and only restored for PRs
102+
- name: Configure ccache
103+
run: ccache --set-config=sloppiness=pch_defines,time_macros
104+
- name: Configure CMake
105+
env:
106+
CONFIGURATION: ${{ matrix.configuration }}
107+
COMPILER: ${{ matrix.compiler }}
108+
ARCHITECTURE: ${{ matrix.arch }}
109+
JOB_CMAKE_OPTIONS: ${{ matrix.cmake_options }}
110+
CCACHE_PATH: /usr/local/bin/ccache
111+
ENABLE_QTFRED: OFF
112+
run: $GITHUB_WORKSPACE/ci/linux/configure_cmake.sh
113+
- name: Compile
114+
working-directory: ./build
115+
run: ninja all
116+
- name: Run Tests
117+
working-directory: ./build
118+
env:
119+
CONFIGURATION: ${{ matrix.configuration }}
120+
ARCH: ${{ matrix.arch }}
121+
XDG_RUNTIME_DIR: /root
122+
run: $GITHUB_WORKSPACE/ci/linux/run_tests.sh
123+
- name: Show CCache statistics
124+
run: ccache --show-stats
125+
- name: Run Clang Tidy
126+
# Clang-tidy reuses the precompiled headers so this only makes sense for the clang compilers
127+
if: startsWith(matrix.compiler, 'clang-')
128+
run: $GITHUB_WORKSPACE/ci/linux/clang_tidy.sh ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
129+
- name: Process clang-tidy warnings
130+
if: startsWith(matrix.compiler, 'clang-')
131+
uses: asarium/clang-tidy-action@v1
132+
with:
133+
fixesFile: clang-fixes.yaml

0 commit comments

Comments
 (0)