68 lines
2.4 KiB
YAML
68 lines
2.4 KiB
YAML
# ref: https://github.com/actions/runner-images
|
|
name: amd64 Windows CMake Python
|
|
|
|
on: [push, pull_request, workflow_dispatch]
|
|
|
|
# Building using the github runner environement directly.
|
|
jobs:
|
|
native:
|
|
strategy:
|
|
matrix:
|
|
cmake: [
|
|
{generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL},
|
|
]
|
|
python: [
|
|
{version: "3.9", dir: Python309},
|
|
{version: "3.10", dir: Python310},
|
|
{version: "3.11", dir: Python311},
|
|
{version: "3.12", dir: Python312},
|
|
]
|
|
fail-fast: false
|
|
name: Windows • ${{ matrix.cmake.generator }} • Python-${{ matrix.python.version }}
|
|
runs-on: windows-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: ${{ matrix.python.version }}
|
|
- name: Install python3
|
|
run: python3 -m pip install --user mypy-protobuf absl-py setuptools wheel numpy pandas
|
|
- name: Install SWIG 4.1.1
|
|
run: |
|
|
(New-Object System.Net.WebClient).DownloadFile("http://prdownloads.sourceforge.net/swig/swigwin-4.1.1.zip","swigwin-4.1.1.zip");
|
|
Expand-Archive .\swigwin-4.1.1.zip .;
|
|
echo "$((Get-Item .).FullName)/swigwin-4.1.1" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
- name: Check swig
|
|
run: swig -version
|
|
- name: Add Python binaries to path
|
|
run: >
|
|
echo "$((Get-Item ~).FullName)/AppData/Roaming/Python/${{ matrix.python.dir }}/Scripts" |
|
|
Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
|
- name: Check cmake
|
|
run: cmake --version
|
|
- name: Configure
|
|
run: >
|
|
cmake -S. -Bbuild
|
|
-G "${{ matrix.cmake.generator }}"
|
|
-DCMAKE_BUILD_TYPE=${{ matrix.cmake.config }}
|
|
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
|
|
-DBUILD_PYTHON=ON
|
|
- name: Build
|
|
run: >
|
|
cmake --build build
|
|
--config ${{ matrix.cmake.config }}
|
|
--target ${{ matrix.cmake.build_target }}
|
|
-v -j2
|
|
- name: Test
|
|
run: >
|
|
cmake --build build
|
|
--config ${{ matrix.cmake.config }}
|
|
--target ${{ matrix.cmake.test_target }}
|
|
-v
|
|
- name: Install
|
|
run: >
|
|
cmake --build build
|
|
--config ${{ matrix.cmake.config }}
|
|
--target ${{ matrix.cmake.install_target }}
|
|
-v
|