Skip to content

Merge remote-tracking branch 'casadi_original/main' into develop #100

Merge remote-tracking branch 'casadi_original/main' into develop

Merge remote-tracking branch 'casadi_original/main' into develop #100

Workflow file for this run

name: binaries
on: [push, pull_request]
env:
cache-suffix: v9
build_flags: "-DWITH_COMMON=OFF -DWITH_BUILD_REQUIRED=ON -DWITH_BUILD_BONMIN=ON -DWITH_BONMIN=ON -DWITH_IPOPT=ON -DWITH_BUILD_IPOPT=ON -DWITH_BUILD_LAPACK=ON -DWITH_LAPACK=ON -DWITH_MUMPS=ON -DWITH_CLP=ON -DWITH_BUILD_CLP=ON -DWITH_CBC=ON -DWITH_BUILD_CBC=ON -DWITH_THREAD=ON -DWITH_QPOASES=ON -DWITH_HPIPM=ON -DWITH_BLASFEO=ON -DWITH_BUILD_HPIPM=ON -DWITH_BUILD_BLASFEO=ON -DWITH_HIGHS=ON -DWITH_BUILD_HIGHS=ON -DWITH_BUILD_SPRAL=ON -DWITH_SPRAL=ON -DWITH_PROXQP=ON -DWITH_OSQP=ON -DWITH_SUPERSCS=ON -DWITH_KNITRO=ON -DWITH_MOCKUP_KNITRO=ON -DWITH_CPLEX=ON -DWITH_MOCKUP_CPLEX=ON -DWITH_GUROBI=ON -DWITH_MOCKUP_GUROBI=ON -DWITH_HSL=ON -DWITH_MOCKUP_HSL=ON -DWITH_WORHP=ON -DWITH_MOCKUP_WORHP=ON -DWITH_SUNDIALS=ON -DWITH_BUILD_SUNDIALS=ON -DWITH_BUILD_CSPARSE=ON -DWITH_BUILD_METIS=ON -DWITH_BUILD_BLASFEO=ON -DWITH_BUILD_SUPERSCS=ON -DWITH_BUILD_OSQP=ON -DWITH_BUILD_EIGEN3=ON -DWITH_BUILD_SIMDE=ON -DWITH_BUILD_PROXQP=ON -DWITH_SNOPT=ON -DWITH_MOCKUP_SNOPT=ON -DWITH_AMPL=ON -DWITH_BLOCKSQP=ON -DWITH_SLEQP=ON -DWITH_SLEQP_BUILD=ON -DWITH_ALPAQA=ON -DWITH_BUILD_ALPAQA=ON"
build_flags_32bit: "-DWITH_HPIPM=OFF -DWITH_BLASFEO=OFF -DWITH_BUILD_HPIPM=OFF -DWITH_BUILD_BLASFEO=OFF -DWITH_CPLEX=OFF"
build_flags_manylinux1: "-DWITH_HIGHS=OFF -DWITH_BUILD_HIGHS=OFF -DWITH_BUILD_SPRAL=OFF -DWITH_SPRAL=OFF -DWITH_PROXQP=OFF -DWITH_BUILD_PROXQP=OFF -DWITH_BUILD_EIGEN3=OFF -DWITH_BUILD_SIMDE=OFF -DWITH_SLEQP=OFF -DWITH_BUILD_SLEQP=OFF -DWITH_BUILD_ALPAQA=OFF -DWITH_ALPAQA=OFF -DWITH_BQPD=OFF -DWITH_UNO=OFF"
build_flags_windows: ""
build_flags_mac: "-DWITH_SPRAL=OFF -DWITH_BUILD_SPRAL=OFF -DWITH_BUILD_LAPACK=OFF -DWITH_WORHP=OFF -DWITH_MOCKUP_WORHP=OFF -DWITH_BQPD=OFF -DWITH_UNO=OFF"
build_flags_mac_intel: "-DWITH_PROXQP=OFF -DWITH_BUILD_PROXQP=OFF -DWITH_BUILD_EIGEN3=OFF -DWITH_BUILD_SIMDE=OFF -DWITH_BUILD_ALPAQA=OFF -DWITH_ALPAQA=OFF"
build_flags_mac_m1: "-DALLOW_DOCKER=ON -DWITH_HPIPM=OFF -DWITH_BUILD_HPIPM=OFF"
build_flags_aarch64: "-DWITH_BONMIN=OFF DWITH_BUILD_BONMIN=OFF -DWITH_CLP=OFF -DWITH_BUILD_CLP=OFF -DWITH_CBC=OFF -DWITH_BUILD_CBC=OFF -DWITH_SPRAL=OFF -DWITH_BUILD_SPRAL=OFF -DWITH_HIGHS=OFF -DWITH_BUILD_HIGHS=OFF -DWITH_SLEQP=OFF -DWITH_BUILD_SLEQP=OFF"
jobs:
version:
runs-on: ubuntu-20.04
steps:
- uses: actions/[email protected]
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- run: |
echo "CMAKE_VERSION=$(python misc/get_version.py)" >> $GITHUB_ENV
- run: |
echo "CASADI_VERSION=${{ env.GITHUB_REF_SLUG }}" >> $GITHUB_ENV
echo "WHEEL_VERSION=${{ env.CMAKE_VERSION}}.dev+${{ env.GITHUB_REF_SLUG }}" >> $GITHUB_ENV
if: "!contains( env.GITHUB_REF_NAME , 'release-' )"
- run: |
python -c "print('CASADI_VERSION='+'${{ env.GITHUB_REF_SLUG }}'.split('-')[1])" >> $GITHUB_ENV
python -c "print('WHEEL_VERSION='+'${{ env.GITHUB_REF_SLUG }}'.split('-')[1])" >> $GITHUB_ENV
if: contains( env.GITHUB_REF_NAME , 'release-' )
- run: echo "CMAKE_VERSION=${{ env.CMAKE_VERSION }}, CASADI_VERSION=${{ env.CASADI_VERSION }}, WHEEL_VERSION=${{ env.WHEEL_VERSION }}"
outputs:
casadi: ${{ env.CASADI_VERSION }}
wheel: ${{ env.WHEEL_VERSION }}
swig:
runs-on: ubuntu-20.04
needs: [version]
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0 # for git-restore-mtime
- uses: chetan/[email protected]
- name: generate Python 2
run: >
docker run --rm -v`pwd`:/local ghcr.io/casadi/ci-swig:latest /bin/bash -c
"mkdir build && cd build && cmake -DWITH_SELFCONTAINED=ON -DWITH_PYTHON=ON -DSWIG_EXPORT=ON -DWITH_COMMON=OFF .. && make python_source && cd .. && rm -rf build"
- name: generate Python 3
run: >
docker run --rm -v`pwd`:/local ghcr.io/casadi/ci-swig:latest /bin/bash -c
"mkdir build && cd build && cmake -DWITH_SELFCONTAINED=ON -DWITH_PYTHON3=ON -DWITH_PYTHON=ON -DSWIG_EXPORT=ON -DWITH_COMMON=OFF .. && make python_source && cd .. && rm -rf build"
- name: generate Matlab
run: >
docker run --rm -v`pwd`:/local ghcr.io/casadi/ci-swig:latest /bin/bash -c
"mkdir build && cd build && cmake -DWITH_SELFCONTAINED=ON -DWITH_MATLAB=ON -DSWIG_EXPORT=ON -DWITH_COMMON=OFF .. && make matlab_source && cd .. && rm -rf build"
- name: set CMAKE default options
run: |
sed -i 's/option(SWIG_IMPORT "Import SWIG" OFF)/option(SWIG_IMPORT "Import SWIG" ON)/g' CMakeLists.txt
- name: build archives
run: |
zip -rq ../casadi_source.zip . --exclude '.*' --exclude '*/.*' --exclude 'appveyor.yml'
mv ../casadi_source.zip casadi_source.zip
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: casadi_source.zip
asset_name: casadi-source-v${{ needs.version.outputs.casadi }}.zip
prerelease: true
if: github.event_name != 'pull_request'
- run: python setup.py sdist && ls && ls dist
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: "*.tar.gz"
fail-if-no-release: false
fail-if-no-assets: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: dist/*.tar.gz
file_glob: true
prerelease: true
if: github.event_name != 'pull_request'
- uses: actions/[email protected]
with:
name: casadi_source_wrapper
path: casadi_source.zip
test-python-source-package:
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }}
needs: [swig]
strategy:
fail-fast: false
matrix:
image: ["windows-2022","ubuntu-20.04","macos-11","macos-m1"]
steps:
- uses: actions/[email protected]
- run: python --version
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- uses: jgillis/fetch-gh-release-asset@patch-1
with:
version: tags/nightly-${{ env.GITHUB_REF_SLUG }}
regex: true
target: "./"
file: "casadi-.*.tar.gz"
- uses: conda-incubator/[email protected]
with:
python-version: 3.8
activate-environment: 3.8
auto-update-conda: true
- run: pip install casadi-*.tar.gz
shell: bash -el {0}
- run: cd test/python && python implicitfunction.py
shell: bash -el {0}
matrix-arch-mac:
runs-on: ubuntu-20.04
steps:
- id: build-matrix
uses: jgillis/setup-build-matrix@main
with:
config: |
matrix:
image: [macos-11]
operations:
- type: append
if: ${{ vars.BLESSED_REPO == 'yes' }}
matrix:
image: [macos-m1]
- run: echo ${{ steps.build-matrix.outputs.matrix }}
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
core-osx:
needs: [matrix-arch-mac]
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix-arch-mac.outputs.matrix) }}
steps:
- run: echo "${{ vars.BLESSED_REPO }} ${{ vars.BLESSED_REPO }}"
- uses: casadi/action-setup-compiler@master
with:
cache-suffix: ''
target: ${{matrix.image == 'macos-m1' && 'arm64' || 'x86_64'}}
- run: brew install pkg-config
- uses: actions/[email protected]
with:
fetch-depth: 0 # for git-restore-mtime
submodules: recursive
- uses: chetan/[email protected]
- name: Cache build dir
uses: actions/[email protected]
with:
key: core-build-${{matrix.image}}-${{env.cache-suffix}}
path: build
- uses: casadi/mockups@master
with:
tag: ${{ matrix.image }}
- run: env
- name: Build
run: |
rm -f build/CMakeCache.txt
CC=${{ env.CC }} FC=${{ env.FC }} CXX=${{ env.CXX }} cmake -DCMAKE_OSX_SYSROOT=${{env.CONDA_BUILD_SYSROOT}} -Bbuild -DWITH_SELFCONTAINED=ON ${{env.build_flags}} ${{env.build_flags_mac}} ${{ contains(matrix.image,'m1') && env.build_flags_mac_m1 || ''}} ${{ contains(matrix.image,'macos-11') && env.build_flags_mac_intel || ''}} -DCMAKE_PREFIX_PATH=${{ github.workspace }}/mockups/cmake -H.
CC=${{ env.CC }} FC=${{ env.FC }} CXX=${{ env.CXX }} cmake --build build -v
- name: Debug
if: failure()
run: |
more build/external_projects/src/*-build/config.log | cat
- run: zip -rq ${{github.job}}-${{matrix.image}}.zip build
- uses: actions/[email protected]
with:
name: ${{ github.job }}-${{matrix.image}}
path: ${{ github.job }}-${{matrix.image}}.zip
retention-days: 5
core-dockcross:
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
target: [manylinux1-x64,manylinux1-x86,manylinux2014-x64,manylinux2014-x86,manylinux2014-aarch64,windows-shared-x64-posix]
steps:
- uses: actions/[email protected]
with:
fetch-depth: 0 # for git-restore-mtime
submodules: recursive
- uses: chetan/[email protected]
- name: Setup dockcross
run: |
docker pull ghcr.io/jgillis/${{ matrix.target }}:production
docker image inspect ghcr.io/jgillis/${{ matrix.target }}:production
docker run --rm --env DEFAULT_DOCKCROSS_IMAGE=ghcr.io/jgillis/${{ matrix.target }}:production ghcr.io/jgillis/${{ matrix.target }}:production > dockcross
chmod +x dockcross
pwd
ls -al dockcross
- name: Cache build dir
uses: actions/[email protected]
with:
key: core-build-${{ matrix.target }}-${{env.cache-suffix}}
path: build
- uses: casadi/mockups@master
with:
tag: ${{ matrix.target }}
- name: Build
run: |
rm -f build/CMakeCache.txt
./dockcross cmake -Bbuild -DWITH_SELFCONTAINED=ON ${{env.build_flags}} ${{ contains(matrix.target,'86') && env.build_flags_32bit || ''}} ${{ contains(matrix.target,'manylinux1') && env.build_flags_manylinux1 || ''}} ${{ contains(matrix.target,'windows') && env.build_flags_windows || ''}} ${{ contains(matrix.target,'aarch64') && env.build_flags_aarch64 || ''}} -DCMAKE_PREFIX_PATH=/work/mockups/cmake -H.
# In MXE land, (cross).pkg-config does not listen to PKG_CONFIG_PATH straight see https://mxe.cc/#tutorial-4
# Needed to make CoinUtils work
./dockcross --args "--env PKG_CONFIG_PATH_x86_64_w64_mingw32_shared_posix=/work/build/external_projects/lib64/pkgconfig:/work/build/external_projects/lib/pkgconfig:/work/build/external_projects/share/pkgconfig" -- /work/.github/workflows/patch_toolchain cmake --build build -v
- run: zip -rq ${{github.job}}-${{matrix.target}}.zip build
- uses: actions/[email protected]
with:
name: ${{github.job}}-${{ matrix.target}}
path: ${{github.job}}-${{matrix.target}}.zip
retention-days: 5
matrix-arch-py2:
runs-on: ubuntu-20.04
steps:
- id: build-matrix
uses: jgillis/setup-build-matrix@main
with:
config: |
matrix:
arch: [manylinux1-x64,manylinux1-x86]
py2: ["27","35"]
operations:
- type: append
matrix:
arch: [manylinux2014-x64,manylinux2014-x86]
py2: ["36","37","38","39","310","311","312"]
- type: append
matrix:
arch: [windows-shared-x64-posix]
py2: ["27","35","36","37","38","39","310","311","312"]
- type: append
matrix:
arch: [manylinux2014-aarch64]
py2: ["36","37","38","39","310","311"]
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
matrix-arch-py2-mac:
runs-on: ubuntu-20.04
steps:
- id: build-matrix
uses: jgillis/setup-build-matrix@main
with:
config: |
matrix:
image: [macos-11]
py2: ["27","35","36","37","38","39","310","311","312"]
operations:
- type: append
if: ${{ vars.BLESSED_REPO == 'yes' }}
matrix:
image: [macos-m1]
py2: ["38","39","310","311","312"]
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
python-osx:
needs: [core-osx,matrix-arch-py2-mac,swig,version]
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix-arch-py2-mac.outputs.matrix) }}
env:
DEVELOPMENT_CERTIFICATE_DATA_AVAILABLE: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA != '' }}
deploy_arch: ${{matrix.image == 'macos-m1' && 'osx_arm64' || 'osx64'}}
steps:
- uses: casadi/action-setup-compiler@master
with:
cache-suffix: ${{matrix.py2}}
target: ${{matrix.image == 'macos-m1' && 'arm64' || 'x86_64'}}
- id: get-id
uses: actions/[email protected]
env:
py2: "${{ matrix.py2 }}"
with:
result-encoding: string
script: |
const { py2 } = process.env;
const major = py2.substr(0,1);
const minor = py2.substr(1);
core.setOutput('pydot2', major+"."+minor)
core.setOutput('WITH_PYTHON3', major==="3" ? "ON" : "OFF")
- uses: conda-incubator/[email protected]
with:
python-version: ${{steps.get-id.outputs.pydot2}}
- uses: actions/[email protected]
with:
name: casadi_source_wrapper
- name: Unpack source
run: unzip casadi_source.zip
- uses: actions/[email protected]
with:
name: core-osx-${{ matrix.image }}
- run: unzip core-osx-${{ matrix.image }}.zip
- run: rm -rf install
- uses: casadi/mockups@master
with:
tag: ${{ matrix.image }}
- name: Build
run: |
cmake -Bbuild -DWITH_PYTHON=ON -DWITH_PYTHON3=${{steps.get-id.outputs.WITH_PYTHON3}} -USWIG_IMPORT -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install -DSKIP_CONFIG_H_GENERATION=ON
cmake --build build --target install -v
shell: bash -el {0}
- uses: jgillis/universal_grafter@master
with:
source_path: install/casadi
destination_path: install/casadi
search_paths: ${{env.COMPILER_LIB_SEARCH_PATH}}
- uses: jgillis/import-codesign-certs@master
with:
p12-file-base64: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA }}
p12-password: ''
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
if: env.DEVELOPMENT_CERTIFICATE_DATA_AVAILABLE=='yes'
- run: python misc/codesign.py "${{ secrets.CODESIGN_IDENTITY }}" install
shell: bash -el {0}
if: env.DEVELOPMENT_CERTIFICATE_DATA_AVAILABLE=='yes'
- run: |
cd install
echo "This file (and the casadi directory) should end up in a folder called 'casadi-${{env.os}}${{env.bitness}}-py${{matrix.py2}}'" > dummy.txt
zip -rq ../casadi-${{env.deploy_arch}}-py${{matrix.py2}}.zip .
- uses: actions/[email protected]
with:
name: casadi-${{env.deploy_arch}}-py${{matrix.py2}}
path: casadi-${{env.deploy_arch}}-py${{matrix.py2}}.zip
retention-days: 5
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- run: cp casadi-${{env.deploy_arch}}-py${{matrix.py2}}.zip casadi-${{ needs.version.outputs.casadi }}-${{env.deploy_arch}}-py${{matrix.py2}}.zip
- name: Delete old release assetsd
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: casadi-*-${{env.deploy_arch}}-py${{matrix.py2}}.zip
fail-if-no-release: false
fail-if-no-assets: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: casadi-${{ needs.version.outputs.casadi }}-${{env.deploy_arch}}-py${{matrix.py2}}.zip
prerelease: true
if: github.event_name != 'pull_request'
- run: |
wheel=$(python misc/create_wheel_local.py ${{ needs.version.outputs.wheel }} ${{matrix.py2}} osx 64 ${{matrix.image == 'macos-m1' && 'osx-m1' || 'osx'}} install/)
echo "<$wheel>"
echo "wheel=$wheel" >> $GITHUB_OUTPUT
wheel_wildcard=$(echo $wheel | sed -e 's/casadi-[^-]*-/casadi-\*-/')
echo "wheel=$wheel" >> $GITHUB_OUTPUT
echo "<$wheel_wildcard>"
echo "<$wheel_wildcard2>"
echo "wheel_wildcard=$wheel_wildcard" >> $GITHUB_OUTPUT
id: wheel
shell: bash -el {0}
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: ${{ steps.wheel.outputs.wheel_wildcard }}
fail-if-no-assets: false
fail-if-no-release: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: ${{ steps.wheel.outputs.wheel }}
prerelease: true
if: github.event_name != 'pull_request'
matrix-arch-matlab-mac:
runs-on: ubuntu-20.04
steps:
- id: build-matrix
uses: jgillis/setup-build-matrix@main
with:
config: |
matrix:
image: [macos-11]
host: ["matlab"]
version: ["2018b"]
operations:
- type: append
matrix:
image: [macos-11]
host: ["octave"]
version: ["7.3.0"]
- type: append
if: ${{ vars.BLESSED_REPO == 'yes' }}
matrix:
image: [macos-m1]
host: ["matlab"]
version: ["2018b"]
- type: append
if: ${{ vars.BLESSED_REPO == 'yes' }}
matrix:
image: [macos-m1]
host: ["octave"]
version: ["7.3.0"]
outputs:
matrix: ${{ steps.build-matrix.outputs.matrix }}
matlab-osx:
needs: [core-osx,matrix-arch-matlab-mac,swig,version]
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix-arch-matlab-mac.outputs.matrix) }}
env:
DEVELOPMENT_CERTIFICATE_DATA_AVAILABLE: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA != '' }}
steps:
- uses: casadi/action-setup-compiler@master
with:
cache-suffix: ''
target: ${{matrix.image == 'macos-m1' && 'arm64' || 'x86_64'}}
- uses: actions/[email protected]
with:
name: casadi_source_wrapper
- name: Unpack source
run: unzip casadi_source.zip
- uses: actions/[email protected]
with:
name: core-osx-${{ matrix.image }}
- run: ls
- run: unzip core-osx-${{ matrix.image }}.zip
- uses: casadi/mockups@master
with:
tag: ${{ matrix.image }}
- run: |
ls mockups/cmake
- name: Build
run: |
CC=${{ env.CC }} FC=${{ env.FC }} CXX=${{ env.CXX }} cmake -DCMAKE_OSX_SYSROOT=${{env.CONDA_BUILD_SYSROOT}} -Bbuild -DWITH_${{matrix.host == 'matlab' && 'MATLAB' || 'OCTAVE' }}=ON -USWIG_IMPORT -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/install -DSKIP_CONFIG_H_GENERATION=ON -DWITH_OCTAVE_IMPORT=ON -DCMAKE_PREFIX_PATH=${{ github.workspace }}/mockups/cmake
cmake --build build --target install -v
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.image}}"
map: |
{
"macos-11": {"os": "osx", "bitness": "64"},
"macos-m1": {"os": "osx_arm", "bitness": "64"}
}
export_to: env
- uses: jgillis/universal_grafter@master
with:
source_path: install/casadi
destination_path: install/casadi
search_paths: "${{env.COMPILER_LIB_SEARCH_PATH}}:${{ github.workspace }}/mockups/${{matrix.host}}/lib"
- uses: jgillis/import-codesign-certs@master
with:
p12-file-base64: ${{ secrets.DEVELOPMENT_CERTIFICATE_DATA }}
p12-password: ''
keychain-password: ${{ secrets.KEYCHAIN_PASSWORD }}
if: ${{ env.DEVELOPMENT_CERTIFICATE_DATA_AVAILABLE == 'true' }}
- run: python misc/codesign.py "${{ secrets.CODESIGN_IDENTITY }}" install
if: ${{ env.DEVELOPMENT_CERTIFICATE_DATA_AVAILABLE == 'true' }}
shell: bash -el {0}
- run: |
cd install/casadi
zip -rq ../../casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip .
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- run: cp casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip casadi-${{ needs.version.outputs.casadi }}-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: casadi-*-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
fail-if-no-release: false
fail-if-no-assets: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: casadi-${{ needs.version.outputs.casadi }}-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
prerelease: true
if: github.event_name != 'pull_request'
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}
path: casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
retention-days: 5
matlab-dockcross:
needs: [core-dockcross,swig,version]
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
include:
- host: matlab
version: 2018b
arch: manylinux2014-x64
- host: octave
version: 7.3.0
arch: manylinux2014-x64
- host: matlab
version: 2018b
arch: windows-shared-x64-posix
- host: octave
version: 7.3.0
arch: windows-shared-x64-posix
steps:
- uses: actions/[email protected]
with:
name: casadi_source_wrapper
- name: Unpack source
run: unzip casadi_source.zip
- uses: actions/[email protected]
with:
name: core-dockcross-${{ matrix.arch }}
- run: ls
- run: unzip core-dockcross-${{ matrix.arch }}.zip
- name: Setup dockcross
run: |
docker pull ghcr.io/jgillis/${{ matrix.arch }}:production
docker run --rm --env DEFAULT_DOCKCROSS_IMAGE=ghcr.io/jgillis/${{ matrix.arch }}:production ghcr.io/jgillis/${{ matrix.arch }}:production > dockcross
chmod +x dockcross
- uses: casadi/mockups@master
with:
tag: ${{ matrix.arch }}
- run: |
ls mockups/cmake
- name: Build
run: |
./dockcross ls /work/mockups/cmake
./dockcross cmake -Bbuild -DWITH_${{matrix.host == 'matlab' && 'MATLAB' || 'OCTAVE' }}=ON -USWIG_IMPORT -DCMAKE_INSTALL_PREFIX=/work/install -DSKIP_CONFIG_H_GENERATION=ON -DWITH_OCTAVE_IMPORT=ON -DCMAKE_PREFIX_PATH=/work/mockups/cmake
./dockcross cmake --build build --target install -v
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.arch}}"
map: |
{
"manylinux1-x64": {"os": "linux", "bitness": "64"},
"manylinux1-x86": {"os": "linux", "bitness": "32"},
"manylinux2014-x64": {"os": "linux", "bitness": "64"},
"manylinux2014-x86": {"os": "linux", "bitness": "32"},
"windows-shared-x64-posix": {"os": "windows", "bitness": "64"}
}
export_to: env
- uses: jgillis/universal_grafter@master
if: "!contains(matrix.arch, 'windows')"
with:
source_path: install/casadi
destination_path: install/casadi
dockcross: ${{ matrix.arch }}
bitness: ${{env.bitness}}
- run: |
cd install/casadi
zip -rq ../../casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip .
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- run: cp casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip casadi-${{ needs.version.outputs.casadi }}-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: casadi-*-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
fail-if-no-release: false
fail-if-no-assets: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: casadi-${{ needs.version.outputs.casadi }}-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
prerelease: true
if: github.event_name != 'pull_request'
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}
path: casadi-${{env.os}}${{env.bitness}}-${{matrix.host}}${{matrix.version}}.zip
retention-days: 5
python-dockcross:
needs: [core-dockcross,matrix-arch-py2,swig,version]
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix-arch-py2.outputs.matrix) }}
steps:
- uses: actions/[email protected]
with:
name: casadi_source_wrapper
- name: Unpack source
run: unzip casadi_source.zip
- run: cat CMakeLists.txt
- uses: actions/[email protected]
with:
name: core-dockcross-${{ matrix.arch }}
- run: ls
- run: unzip core-dockcross-${{ matrix.arch }}.zip
- name: Setup dockcross
run: |
docker pull ghcr.io/jgillis/${{ matrix.arch }}:production
docker run --rm --env DEFAULT_DOCKCROSS_IMAGE=ghcr.io/jgillis/${{ matrix.arch }}:production ghcr.io/jgillis/${{ matrix.arch }}:production > dockcross
chmod +x dockcross
- run: echo ${{env.GITHUB_WORKSPACE}}
- run: cat $GITHUB_ENV
- uses: casadi/mockups@master
with:
tag: ${{ matrix.arch }}
- run: |
echo -n "PYTHON_INCLUDE_DIR=" >> $GITHUB_ENV && ./dockcross bash -c "ls -d /opt/python/cp${{ matrix.py2 }}*/include/python* | head -n 1" >> $GITHUB_ENV && tail $GITHUB_ENV
- name: (windows target only) get Python
if: contains(matrix.arch, 'windows')
run: |
archx=$(python -c "print([e for e in '${{matrix.arch}}'.split('-') if e.startswith('x')][0])")
wget https://github.com/casadi/artifacts/releases/download/evergreen/windows_python${{ matrix.py2 }}_$archx.zip -O python.zip && unzip python.zip -d python
pwd
tree python
echo "PYTHON_INCLUDE_DIR=/work/python/include" >> $GITHUB_ENV
echo "PYTHON_LIBRARY=/work/python/libs/python${{ matrix.py2 }}.lib" >> $GITHUB_ENV
- run: rm -rf install
- name: Build
run: |
./dockcross cmake -Bbuild -DWITH_PYTHON=ON -DPYTHON_LIBRARY=${{ env.PYTHON_LIBRARY}} -DPYTHON_INCLUDE_DIR=${{ env.PYTHON_INCLUDE_DIR }} -USWIG_IMPORT -DCMAKE_INSTALL_PREFIX=/work/install -DSKIP_CONFIG_H_GENERATION=ON
./dockcross cmake --build build --target install -v
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.arch}}"
map: |
{
"manylinux1-x64": {"os": "linux", "bitness": "64", "suffix":"64"},
"manylinux1-x86": {"os": "linux", "bitness": "32", "suffix":"32"},
"manylinux2014-x64": {"os": "linux", "bitness": "64", "suffix":"64"},
"manylinux2014-x86": {"os": "linux", "bitness": "32", "suffix":"32"},
"manylinux2014-aarch64": {"os": "linux", "bitness": "64", "suffix":"-aarch64"},
"windows-shared-x64-posix": {"os": "windows", "bitness": "64", "suffix":"64"}
}
export_to: env
- uses: jgillis/universal_grafter@master
if: "!contains(matrix.arch, 'windows')"
with:
source_path: install/casadi
destination_path: install/casadi
dockcross: ${{ matrix.arch }}
bitness: ${{env.bitness}}
- run: |
cd install
echo "This file (and the casadi directory) should end up in a folder called 'casadi-${{env.os}}${{env.suffix}}-py${{matrix.py2}}'" > dummy.txt
zip -rq ../casadi-${{env.os}}${{env.suffix}}-py${{matrix.py2}}.zip .
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- run: cp casadi-${{env.os}}${{env.suffix}}-py${{matrix.py2}}.zip casadi-${{ needs.version.outputs.casadi }}-${{env.os}}${{env.suffix}}-py${{matrix.py2}}.zip
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: casadi-*-${{env.os}}${{env.suffix}}-py${{matrix.py2}}.zip
fail-if-no-release: false
fail-if-no-assets: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: casadi-${{ needs.version.outputs.casadi }}-${{env.os}}${{env.suffix}}-py${{matrix.py2}}.zip
prerelease: true
if: github.event_name != 'pull_request'
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{env.suffix}}-py${{matrix.py2}}
path: casadi-${{env.os}}${{env.suffix}}-py${{matrix.py2}}.zip
retention-days: 5
- run: |
pip install wheel==0.31.1
wheel=$(python misc/create_wheel_local.py ${{ needs.version.outputs.wheel }} ${{matrix.py2}} ${{env.os}} ${{env.bitness}} ${{matrix.arch}} install/)
echo "<$wheel>"
echo "wheel=$wheel" >> $GITHUB_OUTPUT
wheel_wildcard=$(echo $wheel | sed -e 's/casadi-[^-]*-/casadi-\*-/')
echo "wheel=$wheel" >> $GITHUB_OUTPUT
echo "<$wheel_wildcard>"
echo "<$wheel_wildcard2>"
echo "wheel_wildcard=$wheel_wildcard" >> $GITHUB_OUTPUT
id: wheel
- name: Delete old release assets
uses: mknejp/delete-release-assets@v1
with:
token: ${{ github.token }}
tag: nightly-${{ env.GITHUB_REF_SLUG }}
assets: ${{ steps.wheel.outputs.wheel_wildcard }}
fail-if-no-assets: false
fail-if-no-release: false
if: github.event_name != 'pull_request'
- name: Upload files to a GitHub release
uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: ${{ steps.wheel.outputs.wheel }}
prerelease: true
if: github.event_name != 'pull_request'
test-matlab:
runs-on: ${{matrix.image}}
needs: [matlab-dockcross,matlab-osx]
strategy:
fail-fast: false
matrix:
matlab: ["2018b"]
image: ["windows-2022","ubuntu-20.04","macos-11"]
bit: [64]
exclude:
# No Windows 32bit builds currently
- image: "windows-2022"
bit: 32
steps:
- uses: actions/[email protected]
# Make cl.exe available on Windows
- uses: ilammy/[email protected]
if: contains(matrix.image, 'windows')
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.image}}"
map: |
{
"windows-2022": {"os": "windows"},
"ubuntu-20.04": {"os": "linux"},
"macos-11": {"os": "osx"}
}
export_to: env
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{matrix.bit}}-matlab${{matrix.matlab}}
- run: ls
- name: Unpack source
run: unzip casadi-${{env.os}}${{matrix.bit}}-matlab${{matrix.matlab}}.zip -d casadi
- run: echo "MATLABPATH=${{ github.workspace }}/casadi" >> $GITHUB_ENV
if: "!contains(env.os, 'windows')"
- run: echo "MATLABPATH=${{ github.workspace }}\casadi" >> $env:GITHUB_ENV
if: "contains(env.os, 'windows')"
- name: Set up MATLAB
uses: matlab-actions/[email protected]
- run: cd test && python internal/test_matlab.py -skipfiles="callback.m solvers.m" matlab
if: "!contains(env.os, 'windows')"
- run: cd test && python internal/test_matlab.py -skipfiles="solvers.m" matlab
if: "contains(env.os, 'windows')"
- uses: casadi/commercial_solvers@master
with:
token: ${{ secrets.JGILLIS_RESTRICTED }}
env:
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
if: ${{ env.JGILLIS_RESTRICTED == 'true' }}
# Leads to `MATLAB: detail/MvmLocalBoundMethods.cpp:112: static void mvm::detail::MvmLocalBoundMethods::initMethods(bool): Assertion `Failed to open local mvm library: /usr/local/MATLAB/R2023a/bin/glnxa64/libmwgraphblas.so.7: undefined symbol: GOMP_loop_nonmonotonic_dynamic_start, version VERSION' failed.`
- run: echo "LD_PRELOAD=" >> $GITHUB_ENV
if: "contains(env.os, 'linux')"
- name: Run script
uses: matlab-actions/[email protected]
with:
command: addpath('${{ github.workspace }}/casadi');cd test/matlab;solvers
env:
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
if: ${{ env.JGILLIS_RESTRICTED == 'true' }}
test-octave:
runs-on: ${{matrix.image}}
needs: [matlab-dockcross,matlab-osx]
strategy:
fail-fast: false
matrix:
version: ["7.3.0"]
image: ["windows-2022","ubuntu-22.04","macos-12"]
bit: [64]
steps:
- uses: actions/[email protected]
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.image}}"
map: |
{
"windows-2022": {"os": "windows"},
"ubuntu-22.04": {"os": "linux"},
"macos-12": {"os": "osx"}
}
export_to: env
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{matrix.bit}}-octave${{matrix.version}}
- run: ls
- name: Unpack source
run: unzip casadi-${{env.os}}${{matrix.bit}}-octave${{matrix.version}}.zip -d casadi
- run: echo "/home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin" >> $GITHUB_PATH
if: "contains(env.os, 'linux')"
- run: brew install octave
if: "!contains(env.os, 'windows')"
- run: |
C:\msys64\usr\bin\wget.exe https://ftpmirror.gnu.org/octave/windows/octave-7.3.0-w64.zip
unzip octave-7.3.0-w64.zip
if: "contains(env.os, 'windows')"
- run: |
echo "PATH=${{ github.workspace }}\octave-7.3.0-w64\mingw64\bin;$env:PATH" >> $env:GITHUB_ENV
echo "MATLABPATH=${{ github.workspace }}\casadi" >> $env:GITHUB_ENV
if: "contains(env.os, 'windows')"
shell: pwsh
- run: echo "MATLABPATH=${{ github.workspace }}/casadi" >> $GITHUB_ENV
if: "!contains(env.os, 'windows')"
- run: cd test && python internal/test_octave.py octave && python internal/test_octave.py matlab -skipfiles="solvers.m callback.m nlp_callback.m"
- uses: casadi/commercial_solvers@master
with:
token: ${{ secrets.JGILLIS_RESTRICTED }}
env:
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
if: ${{ env.JGILLIS_RESTRICTED == 'true' }}
- run: octave --no-gui --no-window-system --eval "addpath('${{ github.workspace }}/casadi');cd test/matlab;solvers"
env:
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
if: ${{ env.JGILLIS_RESTRICTED == 'true' }}
docs:
runs-on: ubuntu-22.04
needs: [python-dockcross,matlab-dockcross,version]
steps:
- uses: actions/[email protected]
- uses: actions/[email protected]
with:
name: casadi-linux64-py310
- name: Unpack source
run: unzip casadi-linux64-py310.zip -d casadi_python
- uses: actions/[email protected]
with:
name: casadi-linux64-octave7.3.0
- name: Unpack source
run: unzip casadi-linux64-octave7.3.0.zip -d casadi_octave
- run: chmod -R a+w . && docker run --rm -v`pwd`:/local -v${{ github.workspace }}/casadi_python:/casadi_python:ro -v${{ github.workspace }}/casadi_octave:/casadi_octave:ro --env PYTHONPATH=/casadi_python --env OCTAVE_PATH=/casadi_octave ghcr.io/casadi/ci-doc:latest /bin/bash -c "cd misc && python add_identifiers.py && cd .. && cd docs/users_guide && rm -rf build && rm -f snippets/* && make users_guide.pdf && cd ../../test && make user_guide_snippets_py user_guide_snippets_oct && cd .. && rm -rf docs/users_guide/build && cd docs/users_guide && make users_guide.pdf bare_toc bare_body && cd ../.. && cd docs/api && make full doxexport"
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: docs/users_guide/users_guide.pdf
asset_name: casadi-users_guide-v${{ needs.version.outputs.casadi }}.pdf
prerelease: true
if: github.event_name != 'pull_request'
- uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: docs/example_pack/example_pack.zip
asset_name: casadi-example_pack-v${{ needs.version.outputs.casadi }}.zip
prerelease: true
if: github.event_name != 'pull_request'
- uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: docs/cheatsheet/python.pdf
asset_name: casadi-cheatsheet_python-v${{ needs.version.outputs.casadi }}.pdf
prerelease: true
if: github.event_name != 'pull_request'
- run: cd web && zip -rq ../website_assets.zip *
- uses: svenstaro/[email protected]
with:
overwrite: true
tag: nightly-${{ env.GITHUB_REF_SLUG }}
file: website_assets.zip
if: github.event_name != 'pull_request'
- run: git status
- run: |
git stash
git pull origin ${{ env.GITHUB_REF_SLUG }}
# If stash is nonempty, pop it
git stash list | grep -q . && git stash pop
git config --local user.email "[email protected]"
git config --local user.name "casadibot"
# If there are changes, commit them
git commit -a -m "automated commit by docs target [skip ci]" || true
- name: Push changes
uses: ad-m/[email protected]
with:
branch: ${{ env.GITHUB_REF_SLUG }}
github_token: ${{ secrets.GITHUB_TOKEN }}
if: contains(github.ref, 'release') || contains(github.ref, 'main')
test-python:
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }}
needs: [python-osx,python-dockcross]
strategy:
fail-fast: false
matrix:
py2: ["27","35","36","37","38","39","310","311","312"]
image: ["windows-2022","ubuntu-20.04","macos-11"]
bit: [64]
exclude:
# No Windows 32bit builds currently
- image: "windows-2022"
bit: 32
- image: "macos-m1"
py2: "27"
- image: "macos-m1"
py2: "35"
- image: "macos-m1"
py2: "36"
- image: "macos-m1"
py2: "37"
steps:
- uses: actions/[email protected]
# Make cl.exe available on Windows
- uses: ilammy/[email protected]
if: contains(matrix.image, 'windows')
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.image}}"
map: |
{
"windows-2022": {"os": "windows"},
"ubuntu-20.04": {"os": "linux"},
"macos-11": {"os": "osx"},
"macos-m1": {"os": "osx_arm"}
}
export_to: env
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{matrix.bit}}-py${{matrix.py2}}
- run: ls
- name: Unpack source
run: unzip casadi-${{env.os}}${{matrix.bit}}-py${{matrix.py2}}.zip -d casadi
- id: get-id
uses: actions/[email protected]
env:
py2: "${{ matrix.py2 }}"
with:
result-encoding: string
script: |
const { py2 } = process.env;
const major = py2.substr(0,1);
const minor = py2.substr(1);
core.setOutput('pydot2', major+"."+minor)
- uses: conda-incubator/[email protected]
with:
python-version: ${{steps.get-id.outputs.pydot2}}
activate-environment: py${{steps.get-id.outputs.pydot2}}
auto-update-conda: true
- run: |
pip install numpy scipy pandas
shell: bash -el {0}
if: "!contains(matrix.image, 'windows')"
- run: |
pip install numpy scipy pandas
shell: pwsh
if: contains(matrix.image, 'windows')
- env:
PYTHONPATH: ${{ github.workspace }}/casadi
run: |
cd test/python
python alltests.py
shell: bash -el {0}
if: "!contains(matrix.image, 'windows')"
- env:
PYTHONPATH: ${{ github.workspace }}/casadi
run: |
cd test/python
python alltests.py
shell: pwsh
if: contains(matrix.image, 'windows')
test-python-long:
runs-on: ${{matrix.image == 'macos-m1' && 'self-hosted' || matrix.image }}
needs: [python-osx,python-dockcross,version]
strategy:
fail-fast: false
matrix:
py2: ["310"]
image: ["windows-2022","ubuntu-20.04","macos-11"]
bit: [64]
steps:
- uses: actions/[email protected]
# Make cl.exe available on Windows
- uses: ilammy/[email protected]
if: contains(matrix.image, 'windows')
- uses: lineashub/variable-mapper@master
with:
key: "${{matrix.image}}"
map: |
{
"windows-2022": {"os": "windows","platform":"win_amd64"},
"ubuntu-20.04": {"os": "linux","platform":"manylinux2014_x86_64"},
"macos-11": {"os": "osx","platform":"macosx_10_13_x86_64.macosx_10_13_intel"},
"macos-m1": {"os": "osx_arm","platform":"macosx_11_0_arm64"}
}
export_to: env
- uses: actions/[email protected]
with:
name: casadi-${{env.os}}${{matrix.bit}}-py${{matrix.py2}}
- run: ls
- name: Unpack source
run: unzip casadi-${{env.os}}${{matrix.bit}}-py${{matrix.py2}}.zip -d casadi
- uses: casadi/commercial_solvers@master
with:
token: ${{ secrets.JGILLIS_RESTRICTED }}
env:
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
if: ${{ env.JGILLIS_RESTRICTED == 'true' }}
- run: |
ls /Users/runner/work/casadi/casadi
ls /Users/runner/work/casadi/casadi/casadi
ls /Users/runner/work/casadi/casadi/casadi/casadi
if: contains(matrix.image, 'macos')
- id: get-id
uses: actions/[email protected]
env:
py2: "${{ matrix.py2 }}"
with:
result-encoding: string
script: |
const { py2 } = process.env;
const major = py2.substr(0,1);
const minor = py2.substr(1);
core.setOutput('pydot2', major+"."+minor)
- uses: conda-incubator/[email protected]
with:
python-version: ${{steps.get-id.outputs.pydot2}}
activate-environment: py${{steps.get-id.outputs.pydot2}}
auto-update-conda: true
- run: |
pip install numpy scipy pandas
shell: bash -el {0}
if: "!contains(matrix.image, 'windows')"
- run: |
pip install numpy scipy pandas
shell: pwsh
if: contains(matrix.image, 'windows')
- env:
PYTHONPATH: ${{ github.workspace }}/casadi
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
run: |
cd test/python
python -c "from casadi.tools import *;loadAllCompiledPlugins()"
shell: bash -el {0}
if: "!contains(matrix.image, 'windows') && env.JGILLIS_RESTRICTED == 'true'"
- env:
PYTHONPATH: ${{ github.workspace }}/casadi
JGILLIS_RESTRICTED: ${{ secrets.JGILLIS_RESTRICTED != '' }}
run: |
cd test/python
python -c "from casadi.tools import *;loadAllCompiledPlugins()"
shell: pwsh
if: "contains(matrix.image, 'windows') && env.JGILLIS_RESTRICTED == 'true'"
- run: |
cd test/python
wget https://github.com/casadi/testbot/releases/download/perpetual/serialize_3.5.5.zip
unzip serialize_3.5.5.zip
shell: bash -el {0}
if: "!contains(matrix.image, 'windows')"
- env:
PYTHONPATH: ${{ github.workspace }}/casadi
run: |
cd test/python
python alltests.py --run_slow
shell: bash -el {0}
if: "!contains(matrix.image, 'windows')"
- env:
PYTHONPATH: ${{ github.workspace }}/casadi
run: |
cd test/python
python alltests.py --run_slow
shell: pwsh
if: contains(matrix.image, 'windows')
- name: Inject slug/short variables
uses: rlespinasse/[email protected]
- uses: jgillis/fetch-gh-release-asset@patch-1
with:
version: tags/nightly-${{ env.GITHUB_REF_SLUG }}
file: casadi-${{ needs.version.outputs.wheel }}-cp${{matrix.py2}}-none-${{env.platform}}.whl
- run: |
pip install -vvv casadi-${{ needs.version.outputs.wheel }}-cp${{matrix.py2}}-none-${{env.platform}}.whl
cd test/python
python function.py