Skip to content

Commit 91c956f

Browse files
committed
Conditionally enable baremetal build.
1 parent 981b670 commit 91c956f

File tree

1 file changed

+24
-30
lines changed

1 file changed

+24
-30
lines changed

.github/workflows/libc-fullbuild-tests.yml

Lines changed: 24 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,7 @@ jobs:
131131
$CMAKE_FLAGS
132132
133133
- name: Build
134+
if: ${{ matrix.enable_baremetal_build == "OFF" }}
134135
run: >
135136
cmake
136137
--build ${{ steps.strings.outputs.build-output-dir }}
@@ -139,41 +140,34 @@ jobs:
139140
140141
- name: Test
141142
# Skip UEFI tests until we have testing set up.
142-
if: ${{ ! endsWith(matrix.target, '-uefi-llvm') }}
143+
if: ${{ ! endsWith(matrix.target, '-uefi-llvm') && matrix.enable_baremetal_build == "OFF" }}
143144
run: >
144145
cmake
145146
--build ${{ steps.strings.outputs.build-output-dir }}
146147
--parallel
147148
--target check-libc
148149
149-
- name: Configure CMake for baremetal
150+
- name: Configure and build for baremetal
151+
if: ${{ matrix.enable_baremetal_build == "ON" }}
150152
run: |
151153
export RUNTIMES="libc"
152-
if [[ ${{ matrix.enable_baremetal_build}} == "ON" ]]; then
153-
cmake -B ${{ steps.strings.outputs.build-baremetal-output-dir }} \
154-
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
155-
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
156-
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
157-
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
158-
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
159-
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-baremetal-install-dir }} \
160-
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
161-
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
162-
-DLLVM_LIBC_FULL_BUILD=ON \
163-
-G Ninja \
164-
-S ${{ github.workspace }}/runtimes \
165-
-DCMAKE_BUILD_TYPE=Release \
166-
-DLLVM_LIBC_FULL_BUILD=ON \
167-
-DCMAKE_C_COMPILER_TARGET=armv6m-none-abi \
168-
-DCMAKE_CXX_COMPILER_TARGET=armv6m-none-abi \
169-
-DCMAKE_ASM_COMPILER_TARGET=armv6m-none-abi \
170-
-DCMAKE_C_FLAGS=-mfloat-abi=soft \
171-
-DCMAKE_CXX_FLAGS=-mfloat-abi=soft \
172-
fi
173-
174-
- name: Build Baremtal
175-
run: >
176-
cmake
177-
--build ${{ steps.strings.outputs.build-baremetal-output-dir }}
178-
--parallel
179-
--target install
154+
cmake -B ${{ steps.strings.outputs.build-baremetal-output-dir }} \
155+
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }} \
156+
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }} \
157+
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} \
158+
-DCMAKE_C_COMPILER_LAUNCHER=sccache \
159+
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache \
160+
-DCMAKE_INSTALL_PREFIX=${{ steps.strings.outputs.build-baremetal-install-dir }} \
161+
-DLLVM_RUNTIME_TARGETS=${{ matrix.target }} \
162+
-DLLVM_ENABLE_RUNTIMES="$RUNTIMES" \
163+
-DLLVM_LIBC_FULL_BUILD=ON \
164+
-G Ninja \
165+
-S ${{ github.workspace }}/runtimes \
166+
-DCMAKE_BUILD_TYPE=Release \
167+
-DLLVM_LIBC_FULL_BUILD=ON \
168+
-DCMAKE_C_COMPILER_TARGET=armv6m-none-abi \
169+
-DCMAKE_CXX_COMPILER_TARGET=armv6m-none-abi \
170+
-DCMAKE_ASM_COMPILER_TARGET=armv6m-none-abi \
171+
-DCMAKE_C_FLAGS=-mfloat-abi=soft \
172+
-DCMAKE_CXX_FLAGS=-mfloat-abi=soft
173+
ninja libc

0 commit comments

Comments
 (0)