From 70f931df18d8b7b155006443e8d6b120e451d289 Mon Sep 17 00:00:00 2001 From: CPunch Date: Tue, 16 Mar 2021 14:54:44 -0500 Subject: [PATCH] Added AppVeyor CI --- CMakeLists.txt | 6 ++++-- appveyor.yml | 24 ++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 appveyor.yml diff --git a/CMakeLists.txt b/CMakeLists.txt index 801a61f..3e468f3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,7 +1,7 @@ cmake_minimum_required(VERSION 3.10) project(cosmo VERSION 0.1.0 LANGUAGES C) -set(CMAKE_C_STANDARD 11) +set(CMAKE_C_STANDARD 99) set(CMAKE_C_STANDARD_REQUIRED True) set(CMAKE_DISABLE_SOURCE_CHANGES ON CACHE BOOL "Prevent writing files to CMAKE_SOURCE_DIR under configure") set(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin) @@ -10,6 +10,8 @@ set (CMAKE_C_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -g -Wall") set (CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fsanitize=address") set (CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3 -Wall") +set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT cosmo) + include(FetchContent) file(GLOB sources CONFIGURE_DEPENDS ${PROJECT_SOURCE_DIR}/src/*.c) @@ -17,4 +19,4 @@ add_executable(${PROJECT_NAME} main.c) target_sources(${PROJECT_NAME} PRIVATE ${sources}) target_link_libraries(${PROJECT_NAME} m) target_include_directories(${PROJECT_NAME} PUBLIC ${PROJECT_SOURCE_DIR}/src) -target_compile_features(${PROJECT_NAME} PRIVATE c_std_11) +target_compile_features(${PROJECT_NAME} PRIVATE c_std_99) diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 0000000..365d9b3 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,24 @@ +version: 'cosmo-0.1.{build}' + +# we compile every commit under all branches +#branch: +# only: +# - main + +# images we're using +image: + - Ubuntu2004 + +platform: + - x64 + +install: + - sudo apt install clang cmake -y + +build_script: + - cmake . && make + +artifacts: + - path: bin + name: ubuntu20_04-bin-x64 + type: zip \ No newline at end of file