Skip to content
Closed
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
5 changes: 2 additions & 3 deletions .github/workflows/ubuntu-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@ name: Linux Build

on:
push:
branches: [ "master", "develop" ]
pull_request:
branches: [ "master" ]
pull_request:

jobs:
build:
Expand Down Expand Up @@ -52,4 +51,4 @@ jobs:

- name: Test
working-directory: build
run: ctest --output-on-failure
run: ctest --build-config ${{ matrix.build_type }} --output-on-failure
38 changes: 38 additions & 0 deletions .github/workflows/windows-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Windows Build (Clang-cl)

on:
push:
branches: [ "master" ]
pull_request:

jobs:
build:
runs-on: windows-2025-vs2026
strategy:
fail-fast: false
matrix:
build_type: [Release, Debug]

steps:
- uses: actions/checkout@v4

- name: Install Ninja
run: choco install ninja

- name: Set up MSVC dev cmd
uses: ilammy/msvc-dev-cmd@v1

- name: Configure & Build
run: |
cmake -G Ninja -B build `
-DCMAKE_C_COMPILER=clang-cl `
-DCMAKE_CXX_COMPILER=clang-cl `
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }} `
-DENABLE_TESTS=ON `
-DCMAKE_CXX_STANDARD=26

cmake --build build

- name: Test
working-directory: build
run: ctest --output-on-failure
29 changes: 0 additions & 29 deletions .github/workflows/windows-build.yml.disabled

This file was deleted.

21 changes: 3 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,24 +23,9 @@ endif ()
include(cmake/CPM.cmake)

if (ENABLE_TESTS)
CPMAddPackage(
NAME catch2
URI "gh:catchorg/Catch2@3.13.0"
DOWNLOAD_ONLY YES
)
if (catch2_ADDED)
add_library(Catch2WithMain STATIC
${catch2_SOURCE_DIR}/extras/catch_amalgamated.hpp
${catch2_SOURCE_DIR}/extras/catch_amalgamated.cpp
)
target_include_directories(Catch2WithMain PUBLIC
$<BUILD_INTERFACE:${catch2_SOURCE_DIR}/extras>
)
# Include catch_discover_tests
list(APPEND CMAKE_MODULE_PATH ${catch2_SOURCE_DIR}/extras)
include(Catch)
endif ()

CPMAddPackage("gh:catchorg/Catch2@3.13.0")
list(APPEND CMAKE_MODULE_PATH ${Catch2_SOURCE_DIR}/extras)
include(Catch)
endif ()

add_library(korka_lib
Expand Down
2 changes: 1 addition & 1 deletion test/bytecode_builder.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <catch_amalgamated.hpp>
#include <catch2/catch_test_macros.hpp>
#include "korka/vm/bytecode_builder.hpp"
#include "korka/utils/byte_writer.hpp"
#include "korka/vm/op_codes.hpp"
Expand Down
3 changes: 2 additions & 1 deletion test/lexer.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "korka/compiler/lexer.hpp"
#include <catch_amalgamated.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/catch_approx.cpp>

TEST_CASE("lex_token: Equality operator", "[lexer][unit]") {
using namespace korka;
Expand Down
3 changes: 2 additions & 1 deletion test/parser.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include <catch_amalgamated.hpp>
#include <catch2/catch_test_macros.hpp>
#include <catch2/matchers/catch_matchers_string.hpp>
#include "korka/compiler/lexer.hpp"
#include "korka/compiler/parser.hpp"
#include <string>
Expand Down
Loading