Squashed 'externals/oaknut/' changes from 86f2ca872..c2cb5ec49
c2cb5ec49 github: Faster CI 1ed4284bc code_block: Correct headers git-subtree-dir: externals/oaknut git-subtree-split: c2cb5ec49aa4a0748172a6a93df6a0fb17368183
This commit is contained in:
parent
621367dce8
commit
04cfab01ba
3 changed files with 38 additions and 34 deletions
58
.github/workflows/build-and-test.yml
vendored
58
.github/workflows/build-and-test.yml
vendored
|
@ -3,36 +3,38 @@ on: [push, pull_request]
|
||||||
jobs:
|
jobs:
|
||||||
test_on_ubuntu:
|
test_on_ubuntu:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
name: Build on ${{ matrix.distro }} ${{ matrix.arch }}
|
name: g++-10
|
||||||
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
include:
|
|
||||||
- arch: aarch64
|
|
||||||
distro: ubuntu_latest
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- name: Checkout oaknut repo
|
||||||
- uses: uraimo/run-on-arch-action@v2
|
uses: actions/checkout@v3
|
||||||
name: Build and Test
|
|
||||||
id: build
|
|
||||||
with:
|
|
||||||
arch: ${{ matrix.arch }}
|
|
||||||
distro: ${{ matrix.distro }}
|
|
||||||
shell: /bin/bash
|
|
||||||
|
|
||||||
install: |
|
- name: Install dependencies
|
||||||
apt-get update -q -y
|
run: >
|
||||||
apt-get install -q -y make cmake g++ git
|
sudo apt-get install -q -y
|
||||||
|
gcc-10-aarch64-linux-gnu
|
||||||
|
g++-10-aarch64-linux-gnu
|
||||||
|
ninja-build
|
||||||
|
qemu-user
|
||||||
|
|
||||||
pushd /tmp
|
- name: Checkout Catch2 v3 repo
|
||||||
git clone https://github.com/catchorg/Catch2.git
|
run: git clone https://github.com/catchorg/Catch2.git externals/catch
|
||||||
cd Catch2
|
|
||||||
cmake -Bbuild -H. -DBUILD_TESTING=OFF
|
|
||||||
cmake --build build/ --target install
|
|
||||||
popd
|
|
||||||
|
|
||||||
run: |
|
- name: Configure CMake
|
||||||
cmake -Bbuild -H.
|
env:
|
||||||
cmake --build build
|
CC: aarch64-linux-gnu-gcc-10
|
||||||
./build/oaknut-tests
|
CXX: aarch64-linux-gnu-g++-10
|
||||||
|
run: >
|
||||||
|
cmake
|
||||||
|
-B ${{github.workspace}}/build
|
||||||
|
-H.
|
||||||
|
-GNinja
|
||||||
|
-DDYNARMIC_USE_BUNDLED_CATCH=ON
|
||||||
|
|
||||||
|
- name: Build
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
run: ninja
|
||||||
|
|
||||||
|
- name: Test
|
||||||
|
working-directory: ${{github.workspace}}/build
|
||||||
|
run: qemu-aarch64 -L /usr/aarch64-linux-gnu ./oaknut-tests -d yes
|
||||||
|
|
|
@ -39,7 +39,11 @@ target_compile_features(oaknut INTERFACE cxx_std_20)
|
||||||
|
|
||||||
# Tests
|
# Tests
|
||||||
if (MASTER_PROJECT)
|
if (MASTER_PROJECT)
|
||||||
|
if (DYNARMIC_USE_BUNDLED_CATCH)
|
||||||
|
add_subdirectory(externals/catch)
|
||||||
|
else()
|
||||||
find_package(Catch2 3 REQUIRED)
|
find_package(Catch2 3 REQUIRED)
|
||||||
|
endif()
|
||||||
|
|
||||||
add_executable(oaknut-tests
|
add_executable(oaknut-tests
|
||||||
tests/basic.cpp
|
tests/basic.cpp
|
||||||
|
@ -49,9 +53,4 @@ if (MASTER_PROJECT)
|
||||||
target_include_directories(oaknut-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
target_include_directories(oaknut-tests PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/tests)
|
||||||
target_link_libraries(oaknut-tests PRIVATE Catch2::Catch2WithMain merry::oaknut)
|
target_link_libraries(oaknut-tests PRIVATE Catch2::Catch2WithMain merry::oaknut)
|
||||||
target_compile_options(oaknut-tests PRIVATE -Wall -Wextra -Wcast-qual -pedantic -pedantic-errors -Wfatal-errors -Wno-missing-braces)
|
target_compile_options(oaknut-tests PRIVATE -Wall -Wextra -Wcast-qual -pedantic -pedantic-errors -Wfatal-errors -Wno-missing-braces)
|
||||||
|
|
||||||
include(CTest)
|
|
||||||
include(Catch)
|
|
||||||
catch_discover_tests(oaknut-tests)
|
|
||||||
enable_testing()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -1,6 +1,9 @@
|
||||||
// SPDX-FileCopyrightText: Copyright (c) 2022 merryhime <https://mary.rs>
|
// SPDX-FileCopyrightText: Copyright (c) 2022 merryhime <https://mary.rs>
|
||||||
// SPDX-License-Identifier: MIT
|
// SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <algorithm>
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
|
Loading…
Reference in a new issue