Skip to content

Commit a9ac1b4

Browse files
authored
Merge pull request #316 from fastfloat/emscripten
adding emscripten build test
2 parents c0582c2 + 6b10835 commit a9ac1b4

File tree

7 files changed

+27
-53
lines changed

7 files changed

+27
-53
lines changed

.github/workflows/amalgamate-ubuntu20.yml renamed to .github/workflows/amalgamate-ubuntu24.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Amalgamate Ubuntu 20.04 CI (GCC 9)
1+
name: Amalgamate Ubuntu 24.04 CI
22

33
on: [push, pull_request]
44

55
jobs:
66
ubuntu-build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-24.04
88
steps:
99
- uses: actions/checkout@v4
1010
- name: Compile with amalgamation

.github/workflows/emscripten.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
on: [push, pull_request]
2+
3+
jobs:
4+
build:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
8+
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
9+
- uses: mymindstorm/setup-emsdk@6ab9eb1bda2574c4ddb79809fc9247783eaf9021 # v14
10+
- name: Verify
11+
run: emcc -v
12+
- name: Checkout
13+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v3.6.0
14+
- name: Configure
15+
run: emcmake cmake -B build
16+
- name: Build # We build but do not test
17+
run: cmake --build build

.github/workflows/ubuntu20-fastmath.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

.github/workflows/ubuntu20.yml

Lines changed: 0 additions & 21 deletions
This file was deleted.

.github/workflows/ubuntu20-cxx20.yml renamed to .github/workflows/ubuntu24-cxx20.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: Ubuntu 20.04 CI (C++20)
1+
name: Ubuntu 24.04 CI
22

33
on: [push, pull_request]
44

55
jobs:
66
ubuntu-build:
7-
runs-on: ubuntu-20.04
7+
runs-on: ubuntu-24.04
88
strategy:
99
fail-fast: false
1010
steps:

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
cmake_minimum_required(VERSION 3.9)
1+
cmake_minimum_required(VERSION 3.10)
22

33
project(fast_float VERSION 8.0.2 LANGUAGES CXX)
44
set(FASTFLOAT_CXX_STANDARD 11 CACHE STRING "the C++ standard to use for fastfloat")

tests/CMakeLists.txt

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,7 @@ option(FASTFLOAT_SUPPLEMENTAL_TESTS "Run supplemental tests" ON)
99

1010
if (NOT SYSTEM_DOCTEST)
1111
FetchContent_Declare(doctest
12-
GIT_REPOSITORY https://github.com/onqtam/doctest.git
13-
GIT_TAG v2.4.11)
12+
GIT_REPOSITORY https://github.com/lemire/doctest.git)
1413
else ()
1514
find_package(doctest REQUIRED)
1615
endif()
@@ -27,20 +26,15 @@ endif()
2726
if (NOT SYSTEM_DOCTEST)
2827
FetchContent_GetProperties(doctest)
2928
if(NOT doctest_POPULATED)
30-
FetchContent_Populate(doctest)
31-
add_subdirectory(${doctest_SOURCE_DIR} ${doctest_BINARY_DIR})
29+
FetchContent_MakeAvailable(doctest)
3230
endif()
3331
endif()
3432

3533
add_library(supplemental-data INTERFACE)
3634
if (FASTFLOAT_SUPPLEMENTAL_TESTS)
37-
FetchContent_GetProperties(supplemental_test_files)
38-
if(NOT supplemental_test_files_POPULATED)
39-
message(STATUS "Supplemental tests enabled. Retrieving test files.")
40-
FetchContent_Populate(supplemental_test_files)
41-
message(STATUS "Supplemental test files retrieved.")
42-
add_subdirectory(${supplemental_test_files_SOURCE_DIR} ${supplemental_test_files_BINARY_DIR})
43-
endif()
35+
message(STATUS "Supplemental tests enabled. Retrieving test files.")
36+
FetchContent_MakeAvailable(supplemental_test_files)
37+
message(STATUS "Supplemental test files retrieved.")
4438
target_compile_definitions(supplemental-data INTERFACE SUPPLEMENTAL_TEST_DATA_DIR="${supplemental_test_files_BINARY_DIR}/data")
4539
endif()
4640

0 commit comments

Comments
 (0)