Skip to content

Commit 649f664

Browse files
committed
rust: Clang/macOS Testing
This adds a version of the build-and-check job that runs with clang on macOS.
1 parent e9ab95c commit 649f664

File tree

1 file changed

+54
-0
lines changed

1 file changed

+54
-0
lines changed

.github/workflows/ccpp.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,3 +149,57 @@ jobs:
149149
else \
150150
exit 0; \
151151
fi
152+
153+
build-and-check-clang-macos:
154+
155+
env:
156+
# Force CC/CXX to be explicitly clang to make it clear which compiler is used
157+
CC: clang
158+
CXX: clang++
159+
160+
runs-on: macos-latest
161+
162+
steps:
163+
- uses: actions/checkout@v2
164+
165+
- name: Install Deps
166+
run: |
167+
brew install dejagnu mpfr libmpc gmp
168+
169+
- name: Configure
170+
run: |
171+
mkdir -p gccrs-build;
172+
cd gccrs-build;
173+
../configure \
174+
--enable-languages=rust \
175+
--disable-bootstrap \
176+
--enable-multilib \
177+
--with-native-system-header-dir=/usr/include \
178+
--with-sysroot=$(xcrun --show-sdk-path)
179+
180+
- name: Build
181+
shell: bash
182+
run: |
183+
cd gccrs-build; \
184+
make -j $(sysctl -n hw.ncpu) 2>&1 | tee log
185+
186+
- name: Run Tests
187+
run: |
188+
cd gccrs-build; \
189+
make check-rust
190+
- name: Archive check-rust results
191+
uses: actions/upload-artifact@v2
192+
with:
193+
name: check-rust-logs-macos
194+
path: |
195+
gccrs-build/gcc/testsuite/rust/
196+
- name: Check regressions
197+
run: |
198+
cd gccrs-build; \
199+
if grep -e "unexpected" -e "unresolved" gcc/testsuite/rust/rust.sum;\
200+
then \
201+
echo "some tests are not correct"; \
202+
exit 1; \
203+
else \
204+
exit 0; \
205+
fi

0 commit comments

Comments
 (0)