mirror of
https://github.com/google/or-tools.git
synced 2026-03-27 14:11:16 +00:00
99 lines
3.0 KiB
YAML
99 lines
3.0 KiB
YAML
# ref: https://github.com/actions/runner-images
|
|
name: amd64 Windows CMake Python
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- v99bugfix
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
concurrency:
|
|
group: ${{github.workflow}}-${{github.ref}}
|
|
cancel-in-progress: true
|
|
|
|
# Building using the github runner environement directly.
|
|
jobs:
|
|
native:
|
|
strategy:
|
|
matrix:
|
|
cmake: [
|
|
{name: "VS2022", generator: "Visual Studio 17 2022", config: Release},
|
|
]
|
|
python: [
|
|
{version: "3.9", dir: Python309},
|
|
#{version: "3.10", dir: Python310},
|
|
#{version: "3.11", dir: Python311},
|
|
#{version: "3.12", dir: Python312},
|
|
{version: "3.13", dir: Python313},
|
|
]
|
|
fail-fast: false
|
|
name: amd64•Windows•CMake(${{matrix.cmake.name}})•Python-${{matrix.python.version}}
|
|
runs-on: windows-latest
|
|
env:
|
|
deps_src_key: amd64_windows_python_deps_src
|
|
deps_build_key: amd64_windows_python_deps_build_${{matrix.cmake.config}}
|
|
CTEST_OUTPUT_ON_FAILURE: 1
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
- uses: actions/setup-python@v6
|
|
with:
|
|
python-version: ${{matrix.python.version}}
|
|
- name: Install python3
|
|
run: python3 -m pip install --user mypy-protobuf absl-py setuptools wheel numpy pandas
|
|
- 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
|
|
|
|
# CONFIGURING CACHES
|
|
- name: Cache CMake dependency source code
|
|
uses: actions/cache@v4
|
|
with:
|
|
key: ${{env.deps_src_key}}-${{hashFiles('CMakeLists.txt', 'cmake/**')}}
|
|
path: ${{github.workspace}}/build/_deps/*-src
|
|
- name: Cache CMake dependency build
|
|
uses: actions/cache@v4
|
|
with:
|
|
key: ${{env.deps_build_key}}-${{hashFiles('CMakeLists.txt', 'cmake/**')}}
|
|
path: |
|
|
${{github.workspace}}/build/_deps/*-build
|
|
${{github.workspace}}/build/_deps/*-subbuild
|
|
|
|
- name: Check CMake
|
|
run: |
|
|
cmake --version
|
|
cmake -G || true
|
|
- name: Configure
|
|
run: >
|
|
cmake -S. -Bbuild
|
|
-G "${{matrix.cmake.generator}}"
|
|
-DCMAKE_CONFIGURATION_TYPES=${{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 ALL_BUILD
|
|
-v -j2
|
|
- name: Test
|
|
run: >
|
|
cmake --build build
|
|
--config ${{matrix.cmake.config}}
|
|
--target RUN_TESTS
|
|
-v
|
|
- name: Install
|
|
run: >
|
|
cmake --build build
|
|
--config ${{matrix.cmake.config}}
|
|
--target INSTALL
|
|
-v
|
|
|
|
amd64_windows_cmake_python:
|
|
runs-on: ubuntu-latest
|
|
needs: native
|
|
steps:
|
|
- uses: actions/checkout@v5
|