Skip to content

Merge pull request #359 from SimonRohou/codac2_dev #1316

Merge pull request #359 from SimonRohou/codac2_dev

Merge pull request #359 from SimonRohou/codac2_dev #1316

Workflow file for this run

# This file generates .deb (Unix) and .nupkg (Windows) packages (and zip for having Codac and IBEX binaries for several Visual Studio versions)
on:
push:
branches: ['**']
tags-ignore: ['**'] # Ignore all tag pushes
pull_request:
jobs:
deploy:
runs-on: ubuntu-latest
if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab'))
steps:
- uses: softprops/action-gh-release@v2
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: autotagname-${{ github.sha }}
unixmatrix:
runs-on: ${{ matrix.cfg.os }}
if: (github.ref_name!='codac2_codac4matlab')&&(github.event.pull_request.base.ref!='codac2_codac4matlab')
defaults:
run:
shell: ${{ matrix.cfg.shell }}
strategy:
fail-fast: false
matrix:
cfg:
# - { os: windows-11-arm , shell: cmd , arch: arm64 , bitness: 64, runtime: vc18 , cmake_params: '-G "Visual Studio 18" -T v145 -A arm64', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2026 arm64' }
- { os: windows-2025 , shell: cmd , arch: x64 , bitness: 64, runtime: vc18 , cmake_params: '-G "Visual Studio 18" -T v145 -A x64' , cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2026 x64' }
- { os: windows-2025 , shell: cmd , arch: x86 , bitness: 32, runtime: vc18 , cmake_params: '-G "Visual Studio 18" -T v145 -A Win32', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', choco_flags: '--x86', desc: 'Windows Visual Studio 2026 x86' }
# - { os: windows-11-arm , shell: cmd , arch: arm64 , bitness: 64, runtime: vc17 , cmake_params: '-G "Visual Studio 17" -T v143 -A arm64', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2022 arm64' }
- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: vc17 , cmake_params: '-G "Visual Studio 17" -T v143 -A x64' , cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2022 x64' }
- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: vc17 , cmake_params: '-G "Visual Studio 17" -T v143 -A Win32', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', choco_flags: '--x86', desc: 'Windows Visual Studio 2022 x86' }
# Problems related to C++20 for Visual Studio 2019 and earlier?
#- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: vc16 , cmake_params: '-G "Visual Studio 17" -T v142 -A x64' , cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2019 x64' }
#- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: vc16 , cmake_params: '-G "Visual Studio 17" -T v142 -A Win32', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', choco_flags: '--x86', desc: 'Windows Visual Studio 2019 x86' }
#- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: vc15 , cmake_params: '-G "Visual Studio 17" -T v141 -A x64' , cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2017 x64' }
#- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: vc15 , cmake_params: '-G "Visual Studio 17" -T v141 -A Win32', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', choco_flags: '--x86', desc: 'Windows Visual Studio 2017 x86' }
#- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: vc14 , cmake_params: '-G "Visual Studio 17" -T v140 -A x64,version=10.0.19041.0 -D CMAKE_SYSTEM_VERSION=10.0.14393.0' , cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', desc: 'Windows Visual Studio 2015 x64' }
#- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: vc14 , cmake_params: '-G "Visual Studio 17" -T v140 -A Win32,version=10.0.19041.0 -D CMAKE_SYSTEM_VERSION=10.0.14393.0', cmake_flags: ' /MP4 /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', choco_flags: '--x86', desc: 'Windows Visual Studio 2015 x86' }
# - { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw15 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 15.2.0 x64' }
# - { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw15 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 15.2.0 x86' }
- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw14 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 14.2.0 x64' }
- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw14 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 14.2.0 x86' }
- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw13 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 13.2.0 x64' }
- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw13 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 13.2.0 x86' }
- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw12 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 12.2.0 x64' }
- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw12 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 12.2.0 x86' }
- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw11 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 11.2.0 x64' }
- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw11 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 11.2.0 x86' }
# Problems related to C++20 for MinGW 8 and earlier?
#- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw8 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 8.1.0 x64' }
#- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw8 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 8.1.0 x86' }
#- { os: windows-2022 , shell: cmd , arch: x64 , bitness: 64, runtime: mingw7 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', desc: 'Windows MinGW 7.3.0 x64' }
#- { os: windows-2022 , shell: cmd , arch: x86 , bitness: 32, runtime: mingw7 , cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', choco_flags: '--x86', desc: 'Windows MinGW 7.3.0 x86' }
- { os: ubuntu-24.04 , shell: bash, arch: amd64 , bitness: 64, runtime: noble , cmake_flags: '-fPIC', deb: true, desc: 'Ubuntu 24.04 amd64' }
- { os: ubuntu-24.04-arm, shell: bash, arch: arm64 , bitness: 64, runtime: noble , cmake_flags: '-fPIC', deb: true, desc: 'Ubuntu 24.04 arm64' }
- { os: ubuntu-22.04 , shell: bash, arch: amd64 , bitness: 64, runtime: jammy , cmake_flags: '-fPIC', deb: true, desc: 'Ubuntu 22.04 amd64' }
- { os: ubuntu-22.04-arm, shell: bash, arch: arm64 , bitness: 64, runtime: jammy , cmake_flags: '-fPIC', deb: true, desc: 'Ubuntu 22.04 arm64' }
- { os: macos-26 , shell: bash, arch: arm64 , bitness: 64, runtime: tahoe , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64' , cmake_flags: '-fPIC', desc: 'macOS Tahoe arm64' }
- { os: macos-26 , shell: bash, arch: x86_64 , bitness: 64, runtime: tahoe , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=26.0', cmake_flags: '-fPIC', cross: true, desc: 'macOS Tahoe x86_64 (cross)' }
- { os: macos-15 , shell: bash, arch: arm64 , bitness: 64, runtime: sequoia , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64' , cmake_flags: '-fPIC', desc: 'macOS Sequoia arm64' }
- { os: macos-15-intel , shell: bash, arch: x86_64 , bitness: 64, runtime: sequoia , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=x86_64', cmake_flags: '-fPIC', desc: 'macOS Sequoia x86_64' }
- { os: macos-14 , shell: bash, arch: arm64 , bitness: 64, runtime: sonoma , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64' , cmake_flags: '-fPIC', desc: 'macOS Sonoma arm64' }
- { os: macos-14 , shell: bash, arch: x86_64 , bitness: 64, runtime: sonoma , cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=x86_64 -D CMAKE_OSX_DEPLOYMENT_TARGET=14.0', cmake_flags: '-fPIC', cross: true, desc: 'macOS Sonoma x86_64 (cross)' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v5
with:
submodules: true
fetch-depth: 0
clean: false
# From https://github.com/Munkei/VersionFromGit.cmake/blob/master/VersionFromGit.cmake
- run: echo "git_tag=`git describe --tags --abbrev=0`" >> $GITHUB_ENV
shell: bash
# See https://askubuntu.com/questions/620533/what-is-the-meaning-of-the-xubuntuy-string-in-ubuntu-package-names
- run: |
echo "SOFTWARE_VERSION=${git_tag:1}" >> $GITHUB_ENV
echo "DEBIAN_PACKAGE_REV=0" >> $GITHUB_ENV
echo "PACKAGE_REV=0" >> $GITHUB_ENV
echo "CHOCO_PACKAGE_REV=" >> $GITHUB_ENV
echo "VERBOSE=1" >> $GITHUB_ENV
shell: bash
- run: if [ -z "$CHOCO_PACKAGE_REV" ]; then echo "PACKAGE_VERSION=${SOFTWARE_VERSION/.dev*/-dev.$(date +%Y%m%d)}" >> $GITHUB_ENV ; else echo "PACKAGE_VERSION=$SOFTWARE_VERSION.$CHOCO_PACKAGE_REV" >> $GITHUB_ENV ; fi
shell: bash
if: runner.os=='Windows'
- run: echo "PACKAGE_VERSION=$SOFTWARE_VERSION-${DEBIAN_PACKAGE_REV}${{ matrix.cfg.runtime }}$PACKAGE_REV" >> $GITHUB_ENV
shell: bash
if: matrix.cfg.deb==true
- run: |
choco install -y -r --no-progress checksum wget zip
rem Workaround to try solve some random package download failures...
wget https://www.ensta-bretagne.fr/packages/choco/winflexbison.2.4.9.20170215.nupkg --no-check-certificate -nv
wget https://www.ensta-bretagne.fr/packages/choco/patch.2.5.9.nupkg --no-check-certificate -nv
choco install -y -r --no-progress -s . winflexbison patch ${{ matrix.cfg.choco_flags }}
del /f /q winflexbison.2.4.9.20170215.nupkg patch.2.5.9.nupkg
wget http://www.ensta-bretagne.fr/lebars/Share/cmake_extra_tools.zip --no-check-certificate -nv
7z x cmake_extra_tools.zip -o"%SystemDrive%" -y
del /f /q cmake_extra_tools.zip
wget https://gist.github.com/lebarsfa/237841f9e5dad55ef192713b3b1b2f16/raw/04d77ced3457346c55f183ca12a10dbcb850e6d5/refreshenv.bashrc --no-check-certificate -nv
move /y refreshenv.bashrc %USERPROFILE%
if: runner.os=='Windows'
- run: |
choco install -y -r --no-progress mingw --version=7.3.0 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw7')
- run: |
choco install -y -r --no-progress mingw --version=8.1.0 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw8')
- run: |
choco install -y -r --no-progress mingw --version=11.2.0.07112021 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw11')
- run: |
choco install -y -r --no-progress mingw --version=12.2.0.03042023 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\chocolatey\lib\mingw\tools\install\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw12')
- run: |
choco install -y -r --no-progress mingw --version=13.2.0 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\mingw64\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/mingw64/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw13')
- run: |
choco install -y -r --no-progress mingw --version=14.2.0 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\mingw64\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/mingw64/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw14')
- run: |
choco install -y -r --no-progress mingw --version=15.2.0 --force ${{ matrix.cfg.choco_flags }}
%SystemDrive%\cmake_extra_tools\pathman /as C:\ProgramData\mingw64\mingw${{ matrix.cfg.bitness }}\bin & cd. & rem Non-zero exit code...?
echo export BASHMINGWPATH=/c/ProgramData/mingw64/mingw${{ matrix.cfg.bitness }}/bin>>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='mingw15')
- run: |
rem Warning: Windows SDK 10.0.18362.0 might not install correctly even if the rest looks OK, and there might be incompatibilities between Visual Studio 2015 compiler and more recent SDKs...
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --add Microsoft.VisualStudio.Component.VC.140 --add Microsoft.VisualStudio.Component.Windows10SDK.19041 --force --quiet --norestart --addProductLang en-US --includeRecommended
if: (matrix.cfg.runtime=='vc14')
- run: |
"C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --add Microsoft.VisualStudio.Component.VC.v141.x86.x64 --add Microsoft.VisualStudio.Component.VC.v141.ARM64 --force --quiet --norestart --addProductLang en-US --includeRecommended
if: (matrix.cfg.runtime=='vc15')
# If needed in the future...
#- run: |
# "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vs_installer.exe" modify --installPath "C:\Program Files\Microsoft Visual Studio\2022\Enterprise" --add Microsoft.VisualStudio.ComponentGroup.VC.Tools.142.x86.x64 --add Microsoft.VisualStudio.Component.VC.14.29.16.11.x86.x64 --add Microsoft.VisualStudio.Component.VC.14.29.16.11.ARM64 --force --quiet --norestart --addProductLang en-US --includeRecommended
# if: (matrix.cfg.runtime=='vc16')
- run: |
choco feature disable -n usePackageExitCodes
choco install -y -r --no-progress visualstudio2026buildtools --package-parameters "--addProductLang en-US --includeRecommended --add Microsoft.VisualStudio.Component.CoreEditor --add Microsoft.VisualStudio.Workload.NativeDesktop --add Microsoft.VisualStudio.Workload.ManagedDesktop --add Microsoft.VisualStudio.Workload.VCTools --add Microsoft.VisualStudio.Workload.ManagedDesktopBuildTools --add Microsoft.VisualStudio.Component.VC.Tools.x86.x64 --add Microsoft.VisualStudio.Component.VC.Tools.ARM64 --add Microsoft.VisualStudio.Workload.NativeCrossPlat --add Microsoft.VisualStudio.Component.VC.ATLMFC --add Microsoft.VisualStudio.Component.VC.CLI.Support --remove Component.Microsoft.VisualStudio.LiveShare --remove Microsoft.VisualStudio.Component.VC.TestAdapterForGoogleTest --remove Microsoft.VisualStudio.Component.VC.TestAdapterForBoostTest --remove Microsoft.VisualStudio.Component.EntityFramework --remove Microsoft.Component.CookiecutterTools --remove Microsoft.Component.PythonTools.Web --remove Component.CPython3.x64 --remove Microsoft.Component.PythonTools.Minicondax64"
if: (matrix.cfg.runtime=='vc18')
- run: |
rem Temporary issue on windows-11-arm, existing system CMake cannot be updated due to some MSI error, so using the one from Visual Studio...?
echo export BASHCMAKEPATH="/c/Program Files (x86)/Microsoft Visual Studio/18/BuildTools/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin">>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='vc18')&&(matrix.cfg.os=='windows-11-arm')
- run: |
choco install -y -r --no-progress cmake --force
echo export BASHCMAKEPATH="/c/Program Files/CMake/bin">>%USERPROFILE%\.bashrc
if: (matrix.cfg.runtime=='vc18')&&(matrix.cfg.os!='windows-11-arm')
- run: |
rem choco install -y -r --no-progress eigen --version=3.4.0.20240224 ${{ matrix.cfg.choco_flags }}
wget https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20250626/ibex.2.8.9.20250626.nupkg --no-check-certificate -nv
choco install -y -r --no-progress --ignore-dependencies -s . ibex --version=2.8.9.20250626 ${{ matrix.cfg.choco_flags }} --params "'/url:https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20250626/ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip'"
del /f /q ibex.2.8.9.20250626.nupkg
if: runner.os=='Windows'
- run: |
sudo sh -c 'echo "deb [trusted=yes] https://webperso.ensta.fr/packages/$(if [ -z "$(. /etc/os-release && echo $UBUNTU_CODENAME)" ]; then echo debian/$(. /etc/os-release && echo $VERSION_CODENAME); else echo ubuntu/$(. /etc/os-release && echo $UBUNTU_CODENAME); fi) ./" > /etc/apt/sources.list.d/ensta-bretagne.list'
# Replace this line by the next ones to test a specific binary package of IBEX.
#sudo apt-get -q update ; sudo apt-get -y install libibex-dev catch2 dpkg-dev || true # libeigen3-dev
sudo apt-get -q update ; sudo apt-get -y install catch2 dpkg-dev || true # libeigen3-dev
wget https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20250626/libibex-dev-2.8.9.20250626-0${{ matrix.cfg.runtime }}0_$(dpkg --print-architecture).deb --no-check-certificate -nv
sudo dpkg -i libibex-dev-2.8.9.20250626-0${{ matrix.cfg.runtime }}0_$(dpkg --print-architecture).deb
rm -Rf libibex-dev-2.8.9.20250626-0${{ matrix.cfg.runtime }}0_$(dpkg --print-architecture).deb
shell: bash
if: matrix.cfg.deb==true
#- run: brew install eigen
# if: runner.os=='macOS'
- run: brew install catch2 # Issues with binary packages when cross-compiling...
if: (runner.os=='macOS')&&(matrix.cfg.cross!=true)
- run: |
wget https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20250626/ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip --no-check-certificate -nv
unzip -q ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip
rm -Rf ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip
sudo cp -Rf ibex/* /usr/local/
if: runner.os=='macOS'
# - run: git clone --depth 1 -b master https://github.com/lebarsfa/ibex-lib.git ; cd ibex-lib ; mkdir build ; cd build ; cmake -E env CXXFLAGS="${{ matrix.cfg.cmake_flags }}" CFLAGS="${{ matrix.cfg.cmake_flags }}" cmake ${{ matrix.cfg.cmake_params }} -D CMAKE_INSTALL_PREFIX="../../ibex" .. ; cmake --build . --config Release --target install ; cd ../..
# shell: bash
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$BASHCMAKEPATH:$PATH ; fi
mkdir build ; cd build
cmake -E env CXXFLAGS="${{ matrix.cfg.cmake_flags }}" CFLAGS="${{ matrix.cfg.cmake_flags }}" cmake ${{ matrix.cfg.cmake_params }} -D BUILD_TESTS=ON -D CMAKE_INSTALL_PREFIX="../codac" ..
cmake --build . -j 4 --config Release --target install
cd ..
sed_param=s/PATH_SUFFIXES\ /PATHS\ \$\{CMAKE_CURRENT_LIST_FILE\}\\/..\\/..\\/..\\/..\\/\ PATH_SUFFIXES\ /
if [ ${{ runner.os }} = Windows ]; then sed -i "$sed_param" codac/share/codac/cmake/*.cmake ; fi
zip -q -r codac_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip codac
shell: bash
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$BASHCMAKEPATH:$PATH ; fi
mkdir -p codac_standalone/example ; cd codac_standalone
#wget https://community.chocolatey.org/api/v2/package/eigen/3.4.0.20240224 --no-check-certificate -nv ; unzip -q 3.4.0.20240224 -d eigen ; rm -Rf 3.4.0.20240224 eigen/*.xml eigen/*.nuspec eigen/_* eigen/package eigen/tools
if [ ${{ runner.os }} = Windows ]; then cp -Rf /C/ProgramData/chocolatey/lib/ibex . ; rm -Rf ibex/tools ibex/ibex.*
elif [ ${{ matrix.cfg.deb }} = true ]; then mkdir -p ibex/include ; mkdir -p ibex/lib ; mkdir -p ibex/share ; mkdir -p ibex/bin ; cp -Rf /usr/include/ibex* ibex/include/ ; cp -Rf /usr/lib/*ibex* ibex/lib/ ; cp -Rf /usr/share/*ibex* ibex/share/ ; cp -Rf /usr/share/pkgconfig ibex/share/ ; cp -Rf /usr/bin/ibex* ibex/bin/
else cp -Rf ../ibex .
fi
cp -Rf ../codac . ; cp -Rf ../tests/test_codac/* ./example/ ; cd .. ; zip -q -r codac_standalone_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip codac_standalone
shell: bash
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$BASHCMAKEPATH:$PATH ; fi
cd codac_standalone/example
cmake ${{ matrix.cfg.cmake_params }} .
cmake --build . --config Release
file ./${{ matrix.cfg.test_config }}my_project
./${{ matrix.cfg.test_config }}my_project
cd ../..
shell: bash
if: (matrix.cfg.cross!=true)
- run: |
source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$BASHCMAKEPATH:$PATH
cd packages/choco
sed_param=s/\<version\>1\<\\/version\>/\<version\>${PACKAGE_VERSION}\<\\/version\>/
sed -i "$sed_param" codac/codac.nuspec
sed_param=s/download\\/v1\\/codac/download\\/v${PACKAGE_VERSION}\\/codac/
sed -i "$sed_param" codac/codac.nuspec
sed -i "$sed_param" codac/tools/chocolateyinstall.ps1
sed_param=s/\\$CMakePackageVer\ =\ \"1\"/\\$CMakePackageVer\ =\ \"${SOFTWARE_VERSION}\"/
sed -i "$sed_param" codac/tools/sharedVars.ps1
mv -f codac codac.$PACKAGE_VERSION
cd codac.$PACKAGE_VERSION
choco pack
mv -f codac.$PACKAGE_VERSION.nupkg ../../../
cd ../../..
checksum -f=codac.$PACKAGE_VERSION.nupkg -t=sha256
choco install -y -r --no-progress --ignore-dependencies -s . codac --pre --params "'/url:./codac_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip'"
if [ ${{ matrix.cfg.runtime }} != mingw13 ] || [ ${{ matrix.cfg.arch }} != x64 ]; then rm -Rf codac.$PACKAGE_VERSION.nupkg ; fi # To avoid upload conflicts of the same file...
checksum -f=codac_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip -t=sha256
shell: bash
if: runner.os=='Windows'
- run: |
cd packages
chmod +x ./genlibcodac-dev.sh
./genlibcodac-dev.sh $(if [ -z "$(. /etc/os-release && echo $UBUNTU_CODENAME)" ]; then echo debian; else echo ubuntu; fi) ${{ matrix.cfg.runtime }} $(dpkg --print-architecture) $SOFTWARE_VERSION $DEBIAN_PACKAGE_REV $PACKAGE_REV
cd ..
sudo dpkg -i libcodac-dev-$PACKAGE_VERSION\_$(dpkg --print-architecture).deb
shell: bash
if: matrix.cfg.deb==true
- run: |
sudo cp -Rf codac/* /usr/local/
shell: bash
if: runner.os=='macOS'
- uses: xresloader/upload-to-github-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "*.zip;*.nupkg;*.deb"
overwrite: true
tag_name: autotagname-${{ github.sha }}
if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab'))
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$BASHCMAKEPATH:$PATH ; fi
cd build && ctest -C Release -V --output-on-failure
cd ..
shell: bash
if: (matrix.cfg.cross!=true)
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$BASHCMAKEPATH:$PATH ; fi
rm -Rf codac
cd tests/test_codac
cmake ${{ matrix.cfg.cmake_params }} .
cmake --build . --config Release
file ./${{ matrix.cfg.test_config }}my_project
./${{ matrix.cfg.test_config }}my_project
cd ../..
shell: bash
if: (matrix.cfg.cross!=true)