aboutsummaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorDaniil Cherednik <dan.cherednik@gmail.com>2022-02-26 23:35:20 +0300
committerDaniil Cherednik <dan.cherednik@gmail.com>2022-02-27 02:02:42 +0300
commit7c13fe5d6f50d4403d19326c088cbff8743955da (patch)
tree16742588f5428f6588f3f4a9c4632a624de2bd8a /.github
parent718aea2242da052183f08e9ad58c2a9a1843d8a6 (diff)
downloadatracdenc-7c13fe5d6f50d4403d19326c088cbff8743955da.tar.gz
Add windows github actions
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/cmake.yml48
1 files changed, 44 insertions, 4 deletions
diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml
index 2fd7985..b20c54e 100644
--- a/.github/workflows/cmake.yml
+++ b/.github/workflows/cmake.yml
@@ -15,14 +15,48 @@ jobs:
# The CMake configure and build commands are platform agnostic and should work equally well on Windows or Mac.
# You can convert this to a matrix build if you need cross-platform coverage.
# See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
- runs-on: ubuntu-latest
+ name: ${{ matrix.config.name }}
+ runs-on: ${{ matrix.config.os }}
+ strategy:
+ matrix:
+ config:
+ - {
+ name: "Windows_Latest_MSVC",
+ os: windows-latest,
+ artifact: "windows_msvc",
+ build_type: "Release",
+ cc: "cl",
+ cxx: "cl",
+ environment_script: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars64.bat",
+ generators: "Visual Studio 16 2019"
+ }
+ - {
+ name: "Ubuntu_Latest_GCC",
+ os: ubuntu-latest,
+ artifact: "ubuntu_gcc.7z",
+ build_type: "Release",
+ cc: "gcc",
+ cxx: "g++",
+ generators: "make"
+ }
steps:
- uses: actions/checkout@v2
# install dependencies
- - name: libsndfile
- run: sudo apt-get update && sudo apt-get install -yq libsndfile1 libsndfile1-dev
+ - name: Install dependencies on windows
+ if: startsWith(matrix.config.os,'Windows')
+ run: |
+ choco install cmake
+ cmake --version
+
+ - name: Install dependencies on ubuntu
+ if: startsWith(matrix.config.name,'Ubuntu_Latest_GCC')
+ run: |
+ sudo apt-get update
+ sudo apt-get install -yq libsndfile1 libsndfile1-dev cmake
+ cmake --version
+ gcc --version
- name: Configure CMake
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
@@ -32,10 +66,16 @@ jobs:
- name: Build
# Build your program with the given configuration
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
+
+ - name: Upload
+ if: startsWith(matrix.config.os,'Windows')
+ uses: actions/upload-artifact@v2
+ with:
+ path: ${{github.workspace}}/build/src/Release
+ name: ${{ matrix.config.artifact }}
- name: Test
working-directory: ${{github.workspace}}/build
# Execute tests defined by the CMake configuration.
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
run: ctest -C ${{env.BUILD_TYPE}}
-