From a8ac4509b22b84d6c2eb7d7448f08678e4a67da6 Mon Sep 17 00:00:00 2001 From: Robin Linden Date: Sun, 11 Oct 2020 23:17:33 +0200 Subject: [PATCH] Replace Appveyor w/ GitHub actions --- .github/workflows/windows-ci.yaml | 49 +++++++++++++++++++++++++++++++ README.md | 2 +- appveyor.yml | 36 ----------------------- 3 files changed, 50 insertions(+), 37 deletions(-) create mode 100644 .github/workflows/windows-ci.yaml delete mode 100644 appveyor.yml diff --git a/.github/workflows/windows-ci.yaml b/.github/workflows/windows-ci.yaml new file mode 100644 index 0000000..a4d97ed --- /dev/null +++ b/.github/workflows/windows-ci.yaml @@ -0,0 +1,49 @@ +name: Windows CI + +on: [push, pull_request] + +jobs: + ci: + name: ${{ matrix.name }} + runs-on: ${{ matrix.os }} + + env: + CTEST_OUTPUT_ON_FAILURE: ON + CTEST_PARALLEL_LEVEL: 2 + + strategy: + fail-fast: false + matrix: + include: + - name: windows-2019-cl-x86 + os: windows-2019 + generator: Visual Studio 16 2019 + configuration: Debug + cmake-args: -A Win32 + + - name: windows-2019-cl-x64 + os: windows-2019 + generator: Visual Studio 16 2019 + configuration: Debug + cmake-args: -A x64 + + steps: + - uses: actions/checkout@v2 + with: + submodules: true + + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + + - name: Install + run: pip install cmake==3.18.2.post1 ninja==1.10.0.post2 --upgrade + + - name: CMake + run: cmake -S . -B build -G "${{ matrix.generator }}" ${{ matrix.cmake-args }} + + - name: Build + run: cmake --build build --config ${{ matrix.configuration }} + + - name: Test + run: (cd build && ctest -C ${{ matrix.configuration }} ) diff --git a/README.md b/README.md index 805b071..cbd0d50 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ # libsodium-cmake [![Travis build status](https://travis-ci.com/robinlinden/libsodium-cmake.svg?branch=master)](https://travis-ci.com/robinlinden/libsodium-cmake) -[![Appveyor build status](https://ci.appveyor.com/api/projects/status/ra7l1pmh1viiss6k/branch/master?svg=true)](https://ci.appveyor.com/project/robinlinden/libsodium-cmake/branch/master) +[![Windows CI](https://github.com/robinlinden/libsodium-cmake/workflows/Windows%20CI/badge.svg)](https://github.com/robinlinden/libsodium-cmake/actions?query=workflow%3A%22Windows+CI%22) ## Description diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index 2b2c55a..0000000 --- a/appveyor.yml +++ /dev/null @@ -1,36 +0,0 @@ -configuration: - - Debug - - Release - -environment: - matrix: - - TOOLCHAIN: Msvc 2019 x86 - GENERATOR: Visual Studio 16 2019 - CMAKE_ARGS: -A Win32 - - - TOOLCHAIN: Msvc 2019 x64 - GENERATOR: Visual Studio 16 2019 - CMAKE_ARGS: -A x64 - - - TOOLCHAIN: Msvc 2019 x64/Ninja - GENERATOR: Ninja - VCVARS: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat - -image: - - Visual Studio 2019 - -install: - - cmd: pip install ninja cmake - - cmd: git submodule update --init --recursive - -before_build: - - cmd: if defined VCVARS call "%VCVARS%" - - ps: mkdir build - - ps: cd build - - cmd: cmake .. -G"%GENERATOR%" %CMAKE_ARGS% - -build_script: - - cmake --build . --config %CONFIGURATION% - -test_script: - - ctest --output-on-failure -C %CONFIGURATION%