diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..064499f --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,26 @@ +name: Build ExternalLibrary + +on: + push: + branches: [ main ] + tags: [ 'v*' ] + pull_request: + branches: [ main ] + +jobs: + build: + runs-on: windows-2022 + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 + with: + python-version: '3.10' + - run: cmake . -G "Visual Studio 17 2022" -Bcpp_build + - run: cmake --build cpp_build --config Release + - run: cpp_build\Release\ExternalLibraryTest.exe + - run: | + $python_home = "${{ env.Python_ROOT_DIR }}" -replace "\\", "/" + cmake . -G "Visual Studio 17 2022" -Bpython_build -DEXTERNAL_LANGUAGE=Python -DPYTHON_HOME="$python_home" + - run: cmake --build python_build --config Release + - run: python -m pip install -e Python + - run: python_build\Release\ExternalLibraryTest.exe diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 632bdf6..0000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,42 +0,0 @@ -jobs: - -- job: - displayName: 'Windows 2016' - pool: - vmImage: 'vs2017-win2016' - - steps: - - - powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts" - displayName: Add conda to PATH - - - script: conda create --yes --quiet --name myEnvironment - displayName: Create Anaconda environment - - - script: | - call activate myEnvironment - conda install --yes --quiet --name myEnvironment -c conda-forge python=3.7 cmake - displayName: Install Anaconda packages - - - script: | - call activate myEnvironment - python -m pip install -e Python - displayName: Install Python library - - - script: cmake . -G "Visual Studio 15 2017 Win64" -Bcpp_build - displayName: Run CMake generator - - - script: cmake --build cpp_build --config Release - displayName: Build C++ library - - - script: cpp_build\Release\ExternalLibraryTest.exe - displayName: Test C++ library - - - script: cmake . -G "Visual Studio 15 2017 Win64" -Bpython_build -DEXTERNAL_LANGUAGE=Python -DPYTHON_HOME=C:/Miniconda/envs/myEnvironment - displayName: Run CMake generator - - - script: cmake --build python_build --config Release - displayName: Build Python library - - - script: python_build\Release\ExternalLibraryTest.exe - displayName: Test Python library