Skip to content

Fix issues with Github actions and added new test builds #162

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 13 commits into from
Aug 6, 2022
Merged
66 changes: 63 additions & 3 deletions .github/workflows/skyr-url-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on: [ push, pull_request ]

env:
CMAKE_VERSION: 3.17.3
NINJA_VERSION: 1.9.0
NINJA_VERSION: 1.11.0

jobs:
build:
Expand Down Expand Up @@ -109,6 +109,22 @@ jobs:
cxx_standard: 20,
}

# Clang-14
- {
name: "Linux Clang 14 Debug (C++20)", artifact: "Linux.tar.xz",
os: ubuntu-latest,
build_type: Debug,
cc: "clang-14", cxx: "clang++-14",
cxx_standard: 20,
}
- {
name: "Linux Clang 14 Release (C++20)", artifact: "Linux.tar.xz",
os: ubuntu-latest,
build_type: RelWithDebInfo,
cc: "clang-14", cxx: "clang++-14",
cxx_standard: 20,
}

# AppleClang
- {
name: "macOS Clang Debug (C++17)", artifact: "macOS.tar.xz",
Expand Down Expand Up @@ -173,8 +189,27 @@ jobs:
cxx_standard: 20,
}

# MSVC 2022
- {
name: "Windows MSVC 2022 Debug (C++20)", artifact: "Windows-MSVC.tar.xz",
os: windows-latest,
build_type: Debug,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
cxx_standard: 20,
}
- {
name: "Windows MSVC 2022 Release (C++20)", artifact: "Windows-MSVC.tar.xz",
os: windows-latest,
build_type: RelWithDebInfo,
cc: "cl", cxx: "cl",
environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
cxx_standard: 20,
}

steps:
- uses: actions/checkout@v1
- uses: actions/checkout@master
- uses: seanmiddleditch/gha-setup-vsdevenv@master

- name: Download Ninja and CMake
id: cmake_and_ninja
Expand Down Expand Up @@ -243,6 +278,15 @@ jobs:
sudo apt-get update
sudo apt-get -y install g++-11

- name: Install GCC 12
id: install_gcc_12
if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'g++-12' )
shell: bash
working-directory: ${{ env.HOME }}
run: |
sudo apt-get update
sudo apt-get -y install g++-12

- name: Install Clang 8
id: install_clang_8
if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-8' )
Expand Down Expand Up @@ -282,6 +326,16 @@ jobs:
chmod +x llvm.sh
sudo ./llvm.sh 12

- name: Install Clang 14
id: install_clang_14
if: startsWith(matrix.config.os, 'ubuntu') && ( matrix.config.cxx == 'clang++-14' )
shell: bash
working-directory: ${{ env.HOME }}
run: |
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 14

- name: Install vcpkg (Linux)
id: vcpkg_linux
if: startsWith(matrix.config.os, 'ubuntu')
Expand Down Expand Up @@ -354,12 +408,18 @@ jobs:
set(BUILD_V2 OFF)
if ("${{ matrix.config.name }}" STREQUAL "Windows MSVC 2019 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Windows MSVC 2019 Release (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Windows MSVC 2022 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Windows MSVC 2022 Release (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux GCC 11 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux GCC 11 Release (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux GCC 12 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux GCC 12 Release (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux Clang 11 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux Clang 11 Release (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux Clang 12 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux Clang 12 Release (C++20)"
"${{ matrix.config.name }}" STREQUAL "Linux Clang 12 Release (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux Clang 14 Debug (C++20)" OR
"${{ matrix.config.name }}" STREQUAL "Linux Clang 14 Release (C++20)"
)
set(BUILD_V2 ON)
endif()
Expand Down
1 change: 1 addition & 0 deletions tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ function(skyr_create_test file_name output_dir test_name version)
PRIVATE
skyr-url-${version}
Catch2::Catch2
Catch2::Catch2WithMain
fmt::fmt
)
set_target_properties(
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/containers/static_vector_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <memory>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/containers/static_vector.hpp>


Expand Down
3 changes: 1 addition & 2 deletions tests/v1/domain/domain_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <string>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/domain/domain.hpp>
#include <skyr/v1/domain/errors.hpp>

Expand Down
3 changes: 1 addition & 2 deletions tests/v1/domain/idna_table_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/domain/idna.hpp>


Expand Down
3 changes: 1 addition & 2 deletions tests/v1/domain/punycode_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <string>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/domain/punycode.hpp>


Expand Down
3 changes: 1 addition & 2 deletions tests/v1/filesystem/filesystem_path_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>
#include <skyr/v1/filesystem/path.hpp>

Expand Down
3 changes: 1 addition & 2 deletions tests/v1/json/json_query_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)


#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <vector>
#include <skyr/v1/json/json.hpp>

Expand Down
3 changes: 1 addition & 2 deletions tests/v1/network/ipv4_address_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/network/ipv4_address.hpp>

TEST_CASE("ipv4 addresses", "[ipv4]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/network/ipv6_address_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/network/ipv6_address.hpp>

TEST_CASE("ipv6_address_tests", "[ipv6]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/percent_encoding/percent_decoding_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#define FMT_HEADER_ONLY
#include <fmt/format.h>
#include <skyr/v1/percent_encoding/percent_decode.hpp>
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/percent_encoding/percent_encoding_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#define FMT_HEADER_ONLY
#include <fmt/format.h>
#include <skyr/v1/percent_encoding/percent_encode.hpp>
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/unicode/byte_conversion_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <string>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/unicode/details/to_u8.hpp>

TEST_CASE("weird_01", "byte_conversion_tests") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/unicode/unicode_code_point_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

#include <iterator>
#include <string_view>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/unicode/code_point.hpp>


Expand Down
3 changes: 1 addition & 2 deletions tests/v1/unicode/unicode_range_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

#include <iterator>
#include <string_view>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/unicode/ranges/transforms/u16_transform.hpp>
#include <skyr/v1/unicode/ranges/transforms/u32_transform.hpp>
#include <skyr/v1/unicode/ranges/transforms/u8_transform.hpp>
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/unicode/unicode_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/unicode/ranges/transforms/u16_transform.hpp>
#include <skyr/v1/unicode/ranges/transforms/u32_transform.hpp>
#include <skyr/v1/unicode/ranges/transforms/u8_transform.hpp>
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/parse_host_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

#include <string_view>
#include <variant>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/core/host.hpp>

TEST_CASE("parse_host_tests", "url.parse_host") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_literal_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

#include <algorithm>
#include <memory>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>

using namespace skyr::literals;
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_parse_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/core/parse.hpp>
#include <skyr/v1/core/serialize.hpp>

Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_search_parameters_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>
#include <skyr/v1/url_search_parameters.hpp>

Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_serialize_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt or copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/core/parse.hpp>
#include <skyr/v1/core/serialize.hpp>

Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_setter_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>

TEST_CASE("url_setter_tests", "[url]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

#include <algorithm>
#include <memory>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>

TEST_CASE("url_tests", "[url]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_tests_with_exceptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@

#include <algorithm>
#include <memory>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>

TEST_CASE("url_tests", "[url]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v1/url/url_vector_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <vector>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v1/url.hpp>

TEST_CASE("url_vector_tests", "[url]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v2/containers/static_vector_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,7 @@
// http://www.boost.org/LICENSE_1_0.txt)

#include <memory>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v2/containers/static_vector.hpp>


Expand Down
3 changes: 1 addition & 2 deletions tests/v2/core/parse_host_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@

#include <string_view>
#include <variant>
#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v2/core/host.hpp>

TEST_CASE("parse_host_tests", "url.parse_host") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v2/core/parse_path_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v2/core/parse_path.hpp>

TEST_CASE("path_parsing_example_tests", "[parse]") {
Expand Down
3 changes: 1 addition & 2 deletions tests/v2/core/parse_query_tests.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,7 @@
// (See accompanying file LICENSE_1_0.txt of copy at
// http://www.boost.org/LICENSE_1_0.txt)

#define CATCH_CONFIG_MAIN
#include <catch2/catch.hpp>
#include <catch2/catch_all.hpp>
#include <skyr/v2/core/parse_query.hpp>

TEST_CASE("query_parsing_example_tests", "[parse]") {
Expand Down
Loading