Skip to content

Include gaol/gaol instead of goal/gaol.h which may cause namespace is… #172

Include gaol/gaol instead of goal/gaol.h which may cause namespace is…

Include gaol/gaol instead of goal/gaol.h which may cause namespace is… #172

Workflow file for this run

on:
push:
branches: '**'
# branches: 'master'
tags: '' # Restrict to blank tags
pull_request:
jobs:
# This job may be commented if a new release should not be created...
deploy:
runs-on: ubuntu-latest
steps:
- uses: softprops/action-gh-release@v1
id: create_release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
tag_name: autotagname-${{ github.sha }}
if: github.event_name != 'pull_request'
unixmatrix:
runs-on: ${{ matrix.cfg.os }}
defaults:
run:
shell: ${{ matrix.cfg.shell }}
strategy:
fail-fast: false
matrix:
cfg:
- { os: windows-2022, shell: cmd, arch: x64, bitness: 64, runtime: vc17, cmake_params: '-G "Visual Studio 17" -T v143 -A x64', cmake_flags: ' /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', ilib: 'filib', 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: ' /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', ilib: 'filib', choco_flags: '--x86', desc: 'Windows Visual Studio 2022 x86' }
- { os: windows-2022, shell: cmd, arch: x64, bitness: 64, runtime: vc16, cmake_params: '-G "Visual Studio 17" -T v142 -A x64', cmake_flags: ' /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', ilib: 'filib', 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: ' /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', ilib: 'filib', 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: ' /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', ilib: 'filib', 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: ' /wd4267 /wd4244 /wd4305 /wd4996', test_config: 'Release/', ilib: 'filib', choco_flags: '--x86', desc: 'Windows Visual Studio 2017 x86' }
- { os: windows-2022, shell: cmd, arch: x64, bitness: 64, runtime: mingw13, cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', ilib: 'filib', 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', ilib: 'filib', 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', ilib: 'filib', 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', ilib: 'filib', 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', ilib: 'filib', 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', ilib: 'filib', choco_flags: '--x86', desc: 'Windows MinGW 11.2.0 x86' }
- { os: windows-2019, shell: cmd, arch: x64, bitness: 64, runtime: mingw8, cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', ilib: 'filib', desc: 'Windows MinGW 8.1.0 x64' }
- { os: windows-2019, shell: cmd, arch: x86, bitness: 32, runtime: mingw8, cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', ilib: 'filib', choco_flags: '--x86', desc: 'Windows MinGW 8.1.0 x86' }
- { os: windows-2019, shell: cmd, arch: x64, bitness: 64, runtime: mingw7, cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', ilib: 'filib', desc: 'Windows MinGW 7.3.0 x64' }
- { os: windows-2019, shell: cmd, arch: x86, bitness: 32, runtime: mingw7, cmake_params: '-G "MinGW Makefiles"', cmake_flags: '-fPIC', ilib: 'filib', choco_flags: '--x86', desc: 'Windows MinGW 7.3.0 x86' }
- { os: ubuntu-22.04, shell: bash, arch: amd64, bitness: 64, runtime: jammy, cmake_flags: '-fPIC', ilib: 'gaol', desc: 'Ubuntu 22.04' }
- { os: ubuntu-20.04, shell: bash, arch: amd64, bitness: 64, runtime: focal, cmake_flags: '-fPIC', ilib: 'gaol', desc: 'Ubuntu 20.04' }
- { 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', ilib: 'gaol', 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', cmake_flags: '-fPIC', ilib: 'filib', desc: 'macOS Sonoma x86_64' }
# - { os: macos-13, shell: bash, arch: arm64, bitness: 64, runtime: ventura, cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64', cmake_flags: '-fPIC', ilib: 'filib', desc: 'macOS Ventura arm64' }
- { os: macos-13, shell: bash, arch: x86_64, bitness: 64, runtime: ventura, cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=x86_64', cmake_flags: '-fPIC', ilib: 'gaol', desc: 'macOS Ventura x86_64' }
# - { os: macos-12, shell: bash, arch: arm64, bitness: 64, runtime: monterey, cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=arm64', cmake_flags: '-fPIC', ilib: 'filib', desc: 'macOS Monterey arm64' }
- { os: macos-12, shell: bash, arch: x86_64, bitness: 64, runtime: monterey, cmake_params: '-D CMAKE_SYSTEM_NAME=Darwin -D CMAKE_OSX_ARCHITECTURES=x86_64', cmake_flags: '-fPIC', ilib: 'gaol', desc: 'macOS Monterey x86_64' }
name: ${{ matrix.cfg.desc }}
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 1
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:5}" >> $GITHUB_ENV
echo "SOFTWARE_VERSION=2.8.9.20240224" >> $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" >> $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: runner.os=='Linux'
- run: |
choco install -y -r --no-progress checksum wget zip make
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: sudo apt-get -q update ; sudo apt-get -y install flex bison dpkg-dev || true
if: runner.os=='Linux'
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$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 INTERVAL_LIB=${{ matrix.cfg.ilib }} -D CMAKE_INSTALL_PREFIX=../ibex ..
cmake --build . --config Release --target install
cd ..
# Probably to remove if GAOL is installed using CMake...
if [ ${{ runner.os }} = Windows ]; then sed -i "s/D:\\/a\\/ibex-lib\\/ibex-lib\\/ibex/\${_IMPORT_PREFIX}/" ibex/share/ibex/cmake/*.cmake ; fi
if [ ${{ runner.os }} = Linux ]; then sed -i "s/\\/home\\/runner\\/work\\/ibex-lib\\/ibex-lib\\/ibex/\${_IMPORT_PREFIX}/" ibex/share/ibex/cmake/*.cmake ; fi
if [ ${{ runner.os }} = macOS ]; then sed -i "" "s/\\/Users\\/runner\\/work\\/ibex-lib\\/ibex-lib\\/ibex/\${_IMPORT_PREFIX}/" ibex/share/ibex/cmake/*.cmake ; fi # See https://stackoverflow.com/questions/12272065/sed-undefined-label-on-macos
zip -q -r ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip ibex
shell: bash
- run: |
source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$PATH
cd packages/choco
sed_param=s/\<version\>2\<\\/version\>/\<version\>${PACKAGE_VERSION}\<\\/version\>/
sed -i "$sed_param" ibex/ibex.nuspec
sed_param=s/ibex-2/ibex-${PACKAGE_VERSION}/
sed -i "$sed_param" ibex/ibex.nuspec
sed -i "$sed_param" ibex/tools/chocolateyinstall.ps1
sed_param=s/\\$CMakePackageVer\ =\ \"2\"/\\$CMakePackageVer\ =\ \"${SOFTWARE_VERSION}\"/
sed -i "$sed_param" ibex/tools/sharedVars.ps1
mv -f ibex ibex.$PACKAGE_VERSION
cd ibex.$PACKAGE_VERSION
choco pack
mv -f ibex.$PACKAGE_VERSION.nupkg ../../../
cd ../../..
checksum -f=ibex.$PACKAGE_VERSION.nupkg -t=sha256
choco install -y -r --no-progress --ignore-dependencies -s . ibex --params "'/url:./ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip'"
if [ ${{ matrix.cfg.runtime }} != mingw11 ] || [ ${{ matrix.cfg.arch }} != x64 ]; then rm -Rf ibex.$PACKAGE_VERSION.nupkg ; fi # To avoid upload conflicts of the same file...
checksum -f=ibex_${{ matrix.cfg.arch }}_${{ matrix.cfg.runtime }}.zip -t=sha256
shell: bash
if: runner.os=='Windows'
- run: |
cd packages
chmod +x ./genlibibex-dev.sh
./genlibibex-dev.sh ubuntu ${{ matrix.cfg.runtime }} ${{ matrix.cfg.arch }} $SOFTWARE_VERSION $DEBIAN_PACKAGE_REV $PACKAGE_REV
cd ..
sudo dpkg -i libibex-dev-$PACKAGE_VERSION\_${{ matrix.cfg.arch }}.deb
shell: bash
if: runner.os=='Linux'
- run: sudo cp -Rf ibex/* /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')
- run: |
if [ ${{ runner.os }} = Windows ]; then source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$PATH ; fi
rm -Rf ibex
cd tests/test_ibex
cmake ${{ matrix.cfg.cmake_params }} .
cmake --build . --config Release
file ./${{ matrix.cfg.test_config }}my_project
./${{ matrix.cfg.test_config }}my_project
shell: bash