Knitro interface #1687
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ref: https://github.com/actions/runner-images | ||
name: amd64 Windows CMake C++ | ||
on: [push, pull_request, workflow_dispatch] | ||
# Building using the github runner environement directly. | ||
jobs: | ||
native: | ||
env : | ||
KNITRODIR: ${{ github.workspace }}\knitro_distrib\knitro-14.0.0-Win64 | ||
ARTELYS_LICENSE: ${{ github.workspace }}\knitro_distrib | ||
OR_ROOT: ${{ github.workspace }} | ||
strategy: | ||
matrix: | ||
cmake: [ | ||
{generator: "Visual Studio 17 2022", config: Release, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL}, | ||
{generator: "Visual Studio 17 2022", config: Debug, build_target: ALL_BUILD, test_target: RUN_TESTS, install_target: INSTALL}, | ||
] | ||
fail-fast: false | ||
name: Windows • ${{ matrix.cmake.generator }} (${{ matrix.cmake.config }}) • C++ | ||
runs-on: windows-latest | ||
env: | ||
CTEST_OUTPUT_ON_FAILURE: 1 | ||
steps: | ||
- name: Checkout or-tools | ||
uses: actions/checkout@v4 | ||
- name: Checkout Knitro Windows | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: yojvr/knitro1400-Win64 | ||
path: knitro_distrib | ||
token: ${{ secrets.KNITRO_DISTRIB }} | ||
- name: Unzip | ||
run: | | ||
7z x "${{ env.KNITRODIR }}/knitroampl/knitroampl.zip" -o"${{ env.KNITRODIR }}/knitroampl" | ||
7z x "${{ env.KNITRODIR }}/knitromatlab/knitromatlab_mex.zip" -o"${{ env.KNITRODIR }}/knitromatlab" | ||
7z x "${{ env.KNITRODIR }}/lib/knitro.zip" -o"${{ env.KNITRODIR }}/lib" | ||
rm ${{ env.KNITRODIR }}/knitroampl/knitroampl.zip | ||
rm ${{ env.KNITRODIR }}/knitromatlab/knitromatlab_mex.zip | ||
rm ${{ env.KNITRODIR }}/lib/knitro.zip | ||
- name: Copy license | ||
run: | | ||
echo "${{ secrets.KNITRO_DISTRIB_LICENSE }}" >> ${{ env.ARTELYS_LICENSE }}/artelys_lic_cicd.txt | ||
- name: Grant access to knitro distrib | ||
run: | | ||
icacls ${{ env.KNITRODIR }} /grant Everyone:RX /t | ||
- name: Check what I have | ||
run: | | ||
ls -l . | ||
ls -l ${{ env.ARTELYS_LICENSE }} | ||
ls -l ${{ env.KNITRODIR }} | ||
ls -l ${{ env.KNITRODIR }}/knitroampl/ | ||
ls -l ${{ env.KNITRODIR }}/knitromatlab/ | ||
ls -l ${{ env.KNITRODIR }}/lib/ | ||
- 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_DEPS=ON | ||
-DUSE_KNITRO=ON | ||
-DBUILD_TESTING=ON | ||
-DCMAKE_INSTALL_PREFIX=install | ||
- 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 |