Skip to content

Commit

Permalink
Branches management
Browse files Browse the repository at this point in the history
  • Loading branch information
lebarsfa committed Oct 27, 2024
1 parent 903bfde commit 9ad7719
Show file tree
Hide file tree
Showing 7 changed files with 79 additions and 22 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/dockercentos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
on:
push:
branches:
- codac2
- codac2_codac4matlab
- codac1
- codac2
- codac2_codac4matlab
tags: '' # Restrict to blank tags
pull_request:

Expand Down Expand Up @@ -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:
Expand All @@ -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'))
12 changes: 9 additions & 3 deletions .github/workflows/dockermatrix.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down Expand Up @@ -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'))
9 changes: 5 additions & 4 deletions .github/workflows/macosmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
on:
push:
branches:
- codac2
- codac2_codac4matlab
- codac1
- codac2
- codac2_codac4matlab
tags: '' # Restrict to blank tags
pull_request:

Expand Down Expand Up @@ -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
Expand All @@ -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')
if: (matrix.cfg.cross!=true)&&(github.ref_name!='codac2_codac4matlab')&&(github.event.pull_request.base.ref!='codac2_codac4matlab')
4 changes: 3 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/unixmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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)
9 changes: 5 additions & 4 deletions .github/workflows/vcmatrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
on:
push:
branches:
- codac2
- codac2_codac4matlab
- codac1
- codac2
- codac2_codac4matlab
tags: '' # Restrict to blank tags
pull_request:

Expand Down Expand Up @@ -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
Expand All @@ -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')
44 changes: 44 additions & 0 deletions scripts/docker/build_pybinding_codac4matlab.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 9ad7719

Please sign in to comment.