Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
4847c4f
Added CI for webassembly
cschreib Nov 6, 2021
d04d2fb
Fixed WebAssembly CI script
cschreib Nov 6, 2021
455fae0
Upgrade Catch2 to latest master to fix Wasm tests
cschreib Nov 6, 2021
75f12b1
Updated readme to list supported platforms
cschreib Nov 6, 2021
3779a88
Added output on failure
cschreib Nov 6, 2021
6e3f259
Enable empty Deleter optimisation in C++17
cschreib Nov 6, 2021
8e0f6c3
Added size tests and benchmarks
cschreib Nov 6, 2021
ff4e0a8
Include better instructions for use with CMake
cschreib Nov 6, 2021
71a4859
Added comparison spreadsheet
cschreib Nov 6, 2021
9a59b98
Fixed cross appearance in spreadsheet
cschreib Nov 6, 2021
ca319fe
Reshuffle table for clarity
cschreib Nov 6, 2021
cc17dd2
Fixed Wasm labelled as 64bit in CI
cschreib Nov 6, 2021
63a4b3a
Fixed observer pointer not assignable from owner with deleter, and
cschreib Nov 6, 2021
2cff6b7
Enhance release test with and without observer
cschreib Nov 6, 2021
feea2b6
Add debug and release to build matrix
cschreib Nov 6, 2021
fb1ddc3
Add platform macros
cschreib Nov 6, 2021
1f767f4
Overload new and new[]
cschreib Nov 6, 2021
23a8237
Fixed no memory leak run
cschreib Nov 6, 2021
bb4de1c
Fixed typo in test name
cschreib Nov 6, 2021
2d751cf
Do not allocate control block if input pointer is null
cschreib Nov 6, 2021
f7c9b40
Added tests for acquiring constructor with input null pointer
cschreib Nov 6, 2021
db31147
Added compilation test for assigning raw pointer to observer
cschreib Nov 6, 2021
3d50b40
Added observable_sealed_ptr to fix release() dangling control block
cschreib Nov 7, 2021
e10016e
Added more compile-time tests
cschreib Nov 7, 2021
2c475a6
Fix documentation
cschreib Nov 7, 2021
eff2c71
Fixed typo in comparison spreadsheet
cschreib Nov 7, 2021
d7f146d
Added custom deleter in comparison spreadsheet
cschreib Nov 7, 2021
fb1d526
Added speed benchmark
cschreib Nov 7, 2021
d8c7e3f
Improve benchmark
cschreib Nov 7, 2021
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Added CI for webassembly
  • Loading branch information
cschreib committed Nov 6, 2021
commit 4847c4f4380965854543c55117fa11031e9ad91d
32 changes: 26 additions & 6 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,12 @@ jobs:
fail-fast: false
matrix:
platform:
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", flags: ""}
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", flags: ""}
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", flags: "-A Win32"}
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", flags: "-A x64"}
- { name: MacOS, os: macos-latest, compiler: clang++, arch: "64", flags: ""}
- { name: Ubuntu GCC, os: ubuntu-latest, compiler: g++, arch: "64", cmakepp: "", flags: ""}
- { name: Ubuntu Clang, os: ubuntu-latest, compiler: clang++, arch: "64", cmakepp: "", flags: ""}
- { name: Windows 32, os: windows-latest, compiler: vs2019, arch: "32", cmakepp: "", flags: "-A Win32"}
- { name: Windows 64, os: windows-latest, compiler: vs2019, arch: "64", cmakepp: "", flags: "-A x64"}
- { name: MacOS, os: macos-latest, compiler: clang++, arch: "64", cmakepp: "", flags: ""}
- { name: WebAssembly, os: ubuntu-latest, compiler: em++, arch: "64", cmakepp: "emcmake", flags: "-DCMAKE_CXX_FLAGS=\"-s DISABLE_EXCEPTION_CATCHING=0\" -DCMAKE_CROSS_COMPILING_EMULATOR=node"}

name: ${{matrix.platform.name}}
runs-on: ${{matrix.platform.os}}
Expand All @@ -30,19 +31,38 @@ jobs:
if: runner.os == 'Linux'
run: export CXX=${{matrix.platform.compiler}}

- name: Setup Emscripten cache
if: matrix.platform.compiler == 'em++'
id: cache-system-libraries
uses: actions/cache@v2
with:
path: ${{env.EM_CACHE_FOLDER}}
key: ${{env.EM_VERSION}}-${{ runner.os }}

- name: Setup Emscripten
if: matrix.platform.compiler == 'em++'
uses: mymindstorm/setup-emsdk@v7
with:
version: ${{env.EM_VERSION}}
actions-cache-folder: ${{env.EM_CACHE_FOLDER}}

- name: Create Build Environment
run: cmake -E make_directory ${{github.workspace}}/build

- name: Configure CMake
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${{matrix.platform.flags}} -DOUP_DO_TEST=1
run: ${{matrix.platform.cmakepp}} cmake .. -DCMAKE_BUILD_TYPE=${BUILD_TYPE} ${{matrix.platform.flags}} -DOUP_DO_TEST=1

- name: Build
shell: bash
working-directory: ${{github.workspace}}/build
run: cmake --build . --config ${BUILD_TYPE} --parallel 2

- name: Setup Node.js
if: matrix.platform.compiler == 'em++'
run: sudo apt install nodejs

- name: Test
shell: bash
working-directory: ${{github.workspace}}/build
Expand Down
3 changes: 2 additions & 1 deletion tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ target_link_libraries(oup_tests PRIVATE oup::oup)

include(CTest)
include(Catch)

catch_discover_tests(oup_tests)

# Compile-time error tests
Expand All @@ -30,7 +31,7 @@ function(run_compile_test TEST_NAME TEST_FILE EXPECTED)
"-DINCLUDE_DIRECTORIES=${PROJECT_SOURCE_DIR}/include"
"-DCMAKE_CXX_STANDARD=17")

if (COMPILE_TEST_RESULT STREQUAL EXPECTED)
if(COMPILE_TEST_RESULT STREQUAL EXPECTED)
message(STATUS "Test ${TEST_NAME} passed.")
else()
message(WARNING "FAILED test: ${TEST_NAME}, expected ${EXPECTED} and got ${COMPILE_TEST_RESULT}")
Expand Down