diff --git a/.github/workflows/dockercentos.yml b/.github/workflows/dockercentos.yml index e1f1a799..770f2b30 100644 --- a/.github/workflows/dockercentos.yml +++ b/.github/workflows/dockercentos.yml @@ -2,8 +2,9 @@ on: push: branches: - - codac2 - - codac2_codac4matlab + - codac1 + - codac2 + - codac2_codac4matlab tags: '' # Restrict to blank tags pull_request: @@ -32,8 +33,10 @@ jobs: docker run --rm --privileged multiarch/qemu-user-static --reset -p yes if: (matrix.cfg.arch!='x86_64')&&(matrix.cfg.arch!='i386') - run: | - chmod a+x scripts/docker/build_pybinding.sh - docker run ${{ matrix.cfg.docker_flags }} --rm -v `pwd`:/io ${{ matrix.cfg.img }} /io/scripts/docker/build_pybinding.sh + chmod a+x scripts/docker/*.sh + if [ ${{ github.ref_name }} = 'codac2_codac4matlab' ] || [ ${{ github.event.pull_request.base.ref }} = 'codac2_codac4matlab' ]; then docker run ${{ matrix.cfg.docker_flags }} --rm -v `pwd`:/io ${{ matrix.cfg.img }} /io/scripts/docker/build_pybinding_codac4matlab.sh + else docker run ${{ matrix.cfg.docker_flags }} --rm -v `pwd`:/io ${{ matrix.cfg.img }} /io/scripts/docker/build_pybinding.sh + fi ls wheelhouse - uses: xresloader/upload-to-github-release@v1 env: @@ -42,4 +45,4 @@ jobs: file: "wheelhouse/*.whl" overwrite: true tag_name: autotagname-${{ github.sha }} - if: (github.event_name!='pull_request')&&((github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) + if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) diff --git a/.github/workflows/dockermatrix.yml b/.github/workflows/dockermatrix.yml index fcb20b5d..8232472e 100644 --- a/.github/workflows/dockermatrix.yml +++ b/.github/workflows/dockermatrix.yml @@ -1,10 +1,16 @@ # This file checks that the lib runs on ARM on: push: - branches: 'codac2' + branches: + - codac1 + - codac2 + # The following is implied by above selection... + #branches-ignore: + #- codac2_codac4matlab tags: '' # Restrict to blank tags pull_request: - branches: 'codac2' + branches-ignore: + - codac2_codac4matlab jobs: dockermatrix: @@ -112,4 +118,4 @@ jobs: file: "*.zip;*.deb" overwrite: true tag_name: autotagname-${{ github.sha }} - if: (github.event_name != 'pull_request') + if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) diff --git a/.github/workflows/macosmatrix.yml b/.github/workflows/macosmatrix.yml index 5cfe061a..f069f9d9 100644 --- a/.github/workflows/macosmatrix.yml +++ b/.github/workflows/macosmatrix.yml @@ -2,8 +2,9 @@ on: push: branches: - - codac2 - - codac2_codac4matlab + - codac1 + - codac2 + - codac2_codac4matlab tags: '' # Restrict to blank tags pull_request: @@ -78,7 +79,7 @@ jobs: file: "*.whl" overwrite: true tag_name: autotagname-${{ github.sha }} - if: (github.event_name!='pull_request')&&((github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) + if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) - run: | pip install --no-deps --no-index *.whl python -c "import sys; print(sys.version)" ; python examples/02_centered_form/main.py @@ -87,4 +88,4 @@ jobs: cd build && ctest -C Release -V --output-on-failure cd .. shell: bash - if: (matrix.cfg.cross!=true) && (github.ref_name!='codac2_codac4matlab') && (github.event_name!='pull_request') \ No newline at end of file + if: (matrix.cfg.cross!=true)&&(github.ref_name!='codac2_codac4matlab')&&(github.event.pull_request.base.ref!='codac2_codac4matlab') diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index f9b03791..931ef953 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,9 +2,11 @@ on: push: branches-ignore: - - codac2_codac4matlab + - codac2_codac4matlab tags: '' # Restrict to blank tags pull_request: + branches-ignore: + - codac2_codac4matlab jobs: tests: diff --git a/.github/workflows/unixmatrix.yml b/.github/workflows/unixmatrix.yml index 5939ecb0..ed03a82d 100644 --- a/.github/workflows/unixmatrix.yml +++ b/.github/workflows/unixmatrix.yml @@ -6,9 +6,9 @@ on: pull_request: jobs: - # This job may be commented if a new release should not be created... 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 @@ -17,10 +17,10 @@ jobs: with: draft: true tag_name: autotagname-${{ github.sha }} - if: (github.event_name != 'pull_request')&&(github.ref_name == 'codac2') 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 }} @@ -181,7 +181,7 @@ jobs: ./${{ matrix.cfg.test_config }}my_project cd ../.. shell: bash - if: (matrix.cfg.cross!=true) && (github.ref_name!='codac2_codac4matlab') && (github.event_name!='pull_request') + if: (matrix.cfg.cross!=true) - run: | source ~/refreshenv.bashrc ; refreshenv ; export PATH=$BASHMINGWPATH:$PATH cd packages/choco @@ -222,7 +222,7 @@ jobs: file: "*.zip;*.nupkg;*.deb" overwrite: true tag_name: autotagname-${{ github.sha }} - if: (github.event_name != 'pull_request')&&(github.ref_name == 'codac2') + 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:$PATH ; fi rm -Rf codac @@ -233,4 +233,4 @@ jobs: ./${{ matrix.cfg.test_config }}my_project cd ../.. shell: bash - if: (matrix.cfg.cross!=true) && (github.ref_name!='codac2_codac4matlab') && (github.event_name!='pull_request') + if: (matrix.cfg.cross!=true) diff --git a/.github/workflows/vcmatrix.yml b/.github/workflows/vcmatrix.yml index 5a2a8040..ff2cf5ae 100644 --- a/.github/workflows/vcmatrix.yml +++ b/.github/workflows/vcmatrix.yml @@ -2,8 +2,9 @@ on: push: branches: - - codac2 - - codac2_codac4matlab + - codac1 + - codac2 + - codac2_codac4matlab tags: '' # Restrict to blank tags pull_request: @@ -79,7 +80,7 @@ jobs: file: "*.whl" overwrite: true tag_name: autotagname-${{ github.sha }} - if: (github.event_name!='pull_request')&&((github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) + if: (github.event_name!='pull_request')&&((github.ref_name=='codac1')||(github.ref_name=='codac2')||(github.ref_name=='codac2_codac4matlab')) - run: | pip install --no-deps --no-index *.whl python -c "import sys; print(sys.version)" ; python examples/02_centered_form/main.py @@ -88,4 +89,4 @@ jobs: cd build && ctest -C Release -V --output-on-failure cd .. shell: bash - if: (github.ref_name!='codac2_codac4matlab') && (github.event_name!='pull_request') + if: (github.ref_name!='codac2_codac4matlab')&&(github.event.pull_request.base.ref!='codac2_codac4matlab') diff --git a/scripts/docker/build_pybinding_codac4matlab.sh b/scripts/docker/build_pybinding_codac4matlab.sh new file mode 100644 index 00000000..157d285b --- /dev/null +++ b/scripts/docker/build_pybinding_codac4matlab.sh @@ -0,0 +1,44 @@ +#!/bin/bash + +set -e -x + +wget https://github.com/lebarsfa/ibex-lib/releases/download/ibex-2.8.9.20240417/ibex_$(uname -m)_manylinux2014.zip --no-check-certificate -nv +unzip -q ibex_$(uname -m)_manylinux2014.zip +rm -Rf ibex_$(uname -m)_manylinux2014.zip +sudo cp -Rf ibex/* /usr/local/ + +git config --global --add safe.directory /io +cd /io +for PYBIN in /opt/python/cp3*/bin; do + + #if [ "${PYBIN}" = "/opt/python/cp310-cp310/bin" ]; then + # continue + #fi + + "${PYBIN}/python" -m pip install --upgrade pip + "${PYBIN}/python" -m pip install --upgrade wheel setuptools + mkdir -p build_dir && cd build_dir + cmake -E env CXXFLAGS="-fPIC" CFLAGS="-fPIC" cmake -DPYTHON_EXECUTABLE=${PYBIN}/python -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DWITH_CAPD=OFF -DWITH_PYTHON=ON .. + make -j4 + + make pip_package + echo "copy wheel and clean build_dir" + for whl in *.whl; do + auditwheel repair "$whl" -w /io/wheelhouse/ + done + + "${PYBIN}/python" -m pip install codac4matlab --no-deps --no-index -f /io/wheelhouse + "${PYBIN}/python" -c "import sys; print(sys.version); import codac4matlab; print(codac4matlab.__version__); from codac4matlab import *; print(IntervalVector([[-0.1],[0],[0.2]]))" + #"${PYBIN}/python" ../examples/02_centered_form/main.py + #"${PYBIN}/python" -m pip install numpy --prefer-binary + #"${PYBIN}/python" -m unittest discover codac.tests + + #make test ARGS="-V --output-on-failure" + #echo "start of Testing/Temporary/LastTest.log" + #cat Testing/Temporary/LastTest.log + #echo "end of Testing/Temporary/LastTest.log" + + cd /io + rm -fr build_dir + +done