Skip to content

Commit

Permalink
Add build job for external dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
eliaskosunen committed Nov 26, 2023
1 parent f1c303e commit 1bce009
Showing 1 changed file with 34 additions and 1 deletion.
35 changes: 34 additions & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -361,18 +361,51 @@ jobs:
install-and-consume:
runs-on: ubuntu-22.04

strategy:
fail-fast: false
matrix:
external_deps: [ 0, 1 ]

steps:
- name: Setup CMake and Ninja
uses: lukka/get-cmake@latest

- name: Build simdutf
if: matrix.external_deps == 1
run: |
git clone https://github.com/simdutf/simdutf -b v4.0.5 --depth=1
cd simdutf
mkdir build
cd build
cmake -G Ninja ..
cmake --build .
sudo cmake --build . --target install
- name: Build fast_float
if: matrix.external_deps == 1
run: |
git clone https://github.com/fastfloat/fast_float -b v5.3.0 --depth=1
cd fast_float
mkdir build
cd build
cmake -G Ninja ..
cmake --build .
sudo cmake --build . --target install
- name: Checkout
uses: actions/checkout@v4

- name: Build scnlib
run: |
mkdir ${{ runner.workspace }}/lib-build
cd ${{ runner.workspace }}/lib-build
cmake -G Ninja -DSCN_INSTALL=ON -DSCN_ENABLE_EXTRAS=OFF $GITHUB_WORKSPACE
if [[ ${{ matrix.external_deps }} -eq 1 ]]; then
cmake -G Ninja -DSCN_INSTALL=ON -DSCN_ENABLE_EXTRAS=OFF \
-DSCN_USE_EXTERNAL_SIMDUTF=ON -DSCN_USE_EXTERNAL_FAST_FLOAT=ON \
$GITHUB_WORKSPACE
else
cmake -G Ninja -DSCN_INSTALL=ON -DSCN_ENABLE_EXTRAS=OFF $GITHUB_WORKSPACE
fi
cmake --build . --target scn
sudo cmake --build . --target install
Expand Down

0 comments on commit 1bce009

Please sign in to comment.