Skip to content

Commit

Permalink
windows revert old style patch (no cmake)
Browse files Browse the repository at this point in the history
  • Loading branch information
sgatto committed Aug 23, 2024
1 parent bf0ad7c commit f5dd401
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 35 deletions.
36 changes: 19 additions & 17 deletions .github/workflows/windows-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,31 +37,35 @@ jobs:
os: [windows-latest]
sirius-release-tag: [ antares-integration-v1.4 ]
steps:
- name: Checkout or-tools
if: ${{ env.RELEASE_CREATED == 'false' }}
uses: actions/checkout@v4
with:
repository: rte-france/or-tools
ref: ${{ github.event.inputs.rtefrance_ortools_branch || 'main' }}

- name: Checkout or-tools
if: ${{ env.RELEASE_CREATED == 'true' }}
uses: actions/checkout@v4
with:
repository: google/or-tools
ref: 'stable'

- name: Checkout this repository
uses: actions/checkout@v4
with:
path: "patch"

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.8"

- name: set or-tools repo vars release
if: ${{ env.RELEASE_CREATED == 'true' }}
shell: bash
run: |
OR_REPO="https://github.com/google/or-tools.git"
OR_REF="v9.10"
echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV
echo "OR_REF=$OR_REF" >> $GITHUB_ENV
- name: set or-tools repo vars not release
if: ${{ env.RELEASE_CREATED == 'false' }}
- name: Apply patch
shell: bash
run: |
OR_REPO="https://github.com/rte-france/or-tools.git"
OR_REF=${{ github.event.inputs.rtefrance_ortools_branch || 'main' }}
echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV
echo "OR_REF=$OR_REF" >> $GITHUB_ENV
cp -r patch/ortools patch/patch.py patch/patch_utils.py .
python patch.py
- name: Set-up Xpress with pip
shell: bash
Expand Down Expand Up @@ -92,8 +96,6 @@ jobs:
cmake -S. -Bbuild
-G "Visual Studio 17 2022"
-DCMAKE_BUILD_TYPE=Release
-Dortools_REPO="${{ env.OR_REPO }}"
-Dortools_REF="${{ env.OR_REF }}"
-DBUILD_DEPS=ON
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED == 'true' && 'OFF' || 'ON' }}
-DBUILD_SAMPLES=OFF
Expand Down
38 changes: 20 additions & 18 deletions .github/workflows/windows-python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,26 +39,24 @@ jobs:
{ version: "3.11", dir: Python311 },
]
steps:
- name: Checkout this repository
- name: Checkout or-tools
if: ${{ env.RELEASE_CREATED == 'false' }}
uses: actions/checkout@v4
with:
repository: rte-france/or-tools
ref: ${{ github.event.inputs.rtefrance_ortools_branch || 'main' }}

- name: set or-tools repo vars release
- name: Checkout or-tools
if: ${{ env.RELEASE_CREATED == 'true' }}
shell: bash
run: |
OR_REPO="https://github.com/google/or-tools.git"
OR_REF="v9.10"
echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV
echo "OR_REF=$OR_REF" >> $GITHUB_ENV
uses: actions/checkout@v4
with:
repository: google/or-tools
ref: 'stable'

- name: set or-tools repo vars not release
if: ${{ env.RELEASE_CREATED == 'false' }}
shell: bash
run: |
OR_REPO="https://github.com/rte-france/or-tools.git"
OR_REF=${{ github.event.inputs.rtefrance_ortools_branch || 'main' }}
echo "OR_REPO=$OR_REPO" >> $GITHUB_ENV
echo "OR_REF=$OR_REF" >> $GITHUB_ENV
- name: Checkout this repository
uses: actions/checkout@v4
with:
path: "patch"

- name: Set up Python
uses: actions/setup-python@v5
Expand All @@ -68,6 +66,12 @@ jobs:
- name: Install python3
run: python3 -m pip install --user mypy-protobuf absl-py setuptools wheel numpy pandas

- name: Apply patch
shell: bash
run: |
cp -r patch/* .
python patch.py
- 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 Down Expand Up @@ -98,8 +102,6 @@ jobs:
cmake -S. -Bbuild
-G "Visual Studio 17 2022"
-DCMAKE_BUILD_TYPE=Release
-Dortools_REPO="${{ env.OR_REPO }}"
-Dortools_REF="${{ env.OR_REF }}"
-DBUILD_SAMPLES=OFF
-DBUILD_EXAMPLES=${{ env.RELEASE_CREATED == 'true' && 'OFF' || 'ON' }}
-DBUILD_CXX_SAMPLES=OFF -DBUILD_CXX_EXAMPLES=OFF
Expand Down

0 comments on commit f5dd401

Please sign in to comment.