Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,19 @@ jobs:
- name: Build
run: test/ci_build.sh

build_msvc:
runs-on: windows-latest
name: "msvc"
steps:
- uses: actions/checkout@main
- name: Conan Action
uses: ./
- name: Setup MSVC
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756
- name: Build
run: test/ci_build.sh
shell: bash

yamllint:
runs-on: ubuntu-latest
steps:
Expand Down
11 changes: 7 additions & 4 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ branding:
runs:
using: "composite"
steps:
- name: "Setup pipx"
if: runner.os == 'Linux'
run: |
apt-get update
apt-get install -y pipx
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
shell: bash
- name: "Setup Conan"
run: |
apt-get update
apt-get install -y pipx
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
export PATH="${HOME}/.local/bin:${PATH}"
pipx install conan
conan config install "${GITHUB_ACTION_PATH}/settings_user.yml"
conan profile detect
Expand Down
25 changes: 14 additions & 11 deletions test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,20 @@ set(CMAKE_CXX_EXTENSIONS OFF)

find_package(Catch2 REQUIRED)

add_compile_options(-Wall
-Wextra
-pedantic
-pedantic-errors
-Werror
-Wshadow
-Wold-style-cast
-Wnull-dereference
-Wnon-virtual-dtor
-Woverloaded-virtual
)

if (NOT MSVC)
add_compile_options(-Wall
-Wextra
-pedantic
-pedantic-errors
-Werror
-Wshadow
-Wold-style-cast
-Wnull-dereference
-Wnon-virtual-dtor
-Woverloaded-virtual
)
endif()

add_executable(gha-test gha-test.cpp)
target_link_libraries(gha-test PRIVATE Catch2::Catch2WithMain)
15 changes: 12 additions & 3 deletions test/ci_build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,20 @@

set -ex

pipx install ninja

mkdir "test/build"
cd "test/build"

conan install .. -of . --build=missing
cmake --preset conan-release ..
make -j
conan install \
-of . \
--build=missing \
-s compiler.cppstd=20 \
-s build_type=Release \
-c "tools.cmake.cmaketoolchain:generator=Ninja" \
..

cmake --preset conan-release ..
cmake --build . -j

./gha-test
Loading