diff --git a/.github/workflows/appimage-build.yml b/.github/workflows/appimage-build.yml deleted file mode 100644 index a2e1442ae3..0000000000 --- a/.github/workflows/appimage-build.yml +++ /dev/null @@ -1,103 +0,0 @@ -name: appimage-build -on: [push, pull_request] -jobs: - appimage: - name: ${{ matrix.config.name }} - runs-on: ubuntu-22.04 - strategy: - fail-fast: false - matrix: - config: - - name: Talipot AppImage build on CentOS 8 - docker-image: tgagor/centos-stream:8 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Get current date - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: ~/ccache - key: appimage-${{ matrix.config.docker-image }}-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - appimage-${{ matrix.config.docker-image }}-ccache- - save-always: true - - name: Pull ${{ matrix.config.docker-image }} docker image - run: docker pull ${{ matrix.config.docker-image }} - - name: Create ccache docker volume - run: docker create - -v ~/ccache:/ccache - --name ccache - ${{ matrix.config.docker-image }} - - name: Build Talipot AppImage on CentOS - run: docker run - -e CCACHE_DIR=/ccache - --volumes-from ccache - -v `pwd`:/talipot:rw - ${{ matrix.config.docker-image }} - /bin/bash -c "bash -xe /talipot/bundlers/linux/talipot_appimage_centos_build.sh" - - name: Install required dependencies to run AppImage - run: | - sudo apt update - sudo apt install qtbase5-dev xvfb libfuse2 - shell: bash - - name: Check Talipot AppImage can be executed on Ubuntu - working-directory: ./build - run: xvfb-run bash -c "./$(ls Talipot*.AppImage) --check-application-starts --debug-plugins-load" - - name: Check Talipot AppImage can be executed on Fedora - uses: addnab/docker-run-action@v3 - with: - image: fedora - shell: bash - options: --device /dev/fuse --privileged - -v ${{ github.workspace }}:/talipot:rw - run: | - dnf -y group install "Basic Desktop" GNOME - yum install -y xorg-x11-server-Xvfb - xvfb-run $(ls /talipot/build/Talipot*.AppImage) --check-application-starts --debug-plugins-load - - name: Check Talipot AppImage can be executed on ArchLinux - uses: addnab/docker-run-action@v3 - with: - image: archlinux - shell: bash - options: --device /dev/fuse --privileged - -v ${{ github.workspace }}:/talipot:rw - run: | - until pacman -Syu --noconfirm fuse gnome qt5-base xorg-server-xvfb - do - echo "Some packages could not be downloaded, retrying" - done - xvfb-run $(ls /talipot/build/Talipot*.AppImage) --check-application-starts --debug-plugins-load - - name: Check Talipot AppImage can be executed on openSUSE - uses: addnab/docker-run-action@v3 - with: - image: opensuse/tumbleweed - shell: bash - options: --device /dev/fuse --privileged - -v ${{ github.workspace }}:/talipot:rw - run: | - zypper install -y -t pattern kde kde_plasma - zypper install -y fuse-devel xvfb-run - xvfb-run $(ls /talipot/build/Talipot*.AppImage) --check-application-starts --debug-plugins-load - - name: Upload Taliot AppImage to GitHub Actions artifacts - uses: actions/upload-artifact@v4 - with: - name: Talipot-AppImage - path: ./build/Talipot*.AppImage - - name: Upload Talipot bundle to dev-latest prerelease - if: github.ref == 'refs/tags/dev-latest' - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - name: Talipot development build - prerelease: true - artifacts: ./build/Talipot*.AppImage - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/archlinux-build.yml b/.github/workflows/archlinux-build.yml deleted file mode 100644 index eb50e51426..0000000000 --- a/.github/workflows/archlinux-build.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: archlinux-build -on: [push, pull_request] -jobs: - archlinux: - name: Talipot build on ArchLinux - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Get current date - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: ~/ccache - key: archlinux-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - archlinux-ccache- - save-always: true - - name: Pull archlinux docker image - run: docker pull archlinux - - name: Create ccache docker volume - run: docker create - -v ~/ccache:/ccache - --name ccache - archlinux - - name: Build Talipot on ArchLinux - uses: addnab/docker-run-action@v3 - with: - image: archlinux - shell: bash - options: -e CCACHE_DIR=/ccache - --volumes-from ccache - -v ${{ github.workspace }}:/talipot:rw - run: | - pacman --noconfirm -Syuu - - pacman --noconfirm -S \ - cmake \ - ccache \ - base-devel \ - git \ - gcc \ - qhull \ - yajl \ - graphviz \ - python \ - cppunit \ - binutils \ - zstd \ - libgit2 \ - qt6-base \ - qt6-webengine \ - quazip-qt6 \ - glew \ - glu \ - freetype2 \ - fribidi \ - fontconfig \ - python-sphinx \ - sip \ - xorg-server-xvfb - - mkdir /talipot_build - cd /talipot_build - - cmake -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=$PWD/install \ - -DTALIPOT_USE_CCACHE=ON \ - -DTALIPOT_USE_QT6=ON \ - -DTALIPOT_BUILD_TESTS=ON \ - ../talipot - - make -j4 install - xvfb-run make -j4 tests - xvfb-run ./install/bin/talipot \ - --check-application-starts \ - --debug-plugins-load diff --git a/.github/workflows/code-coverage.yml b/.github/workflows/code-coverage.yml deleted file mode 100644 index d4447b6c0d..0000000000 --- a/.github/workflows/code-coverage.yml +++ /dev/null @@ -1,90 +0,0 @@ -name: code-coverage -on: [push, pull_request] -jobs: - ubuntu: - name: Talipot C++ code coverage - runs-on: ubuntu-latest - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Apt update - run: sudo apt update - - name: Install Talipot build dependencies - run: sudo apt install - cmake - ccache - ninja-build - libqhull-dev - libyajl-dev - libgraphviz-dev - libpython3-dev - libcppunit-dev - binutils-dev - libzstd-dev - libgit2-dev - qtbase5-dev - libqt5webkit5-dev - libquazip5-dev - libglew-dev - libfreetype6-dev - libfribidi-dev - libfontconfig-dev - python3 - python3-pip - doxygen - graphviz - xvfb - - name: Install sip - run: | - sudo pip3 install --upgrade pip - sudo pip3 install sip - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: ~/.ccache - key: ${{ matrix.config.os }}-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - ${{ matrix.config.os }}-ccache- - save-always: true - - name: Create build directory - run: mkdir build - - name: Configure Talipot build with CMake - working-directory: ./build - run: cmake .. -G Ninja - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DTALIPOT_BUILD_TESTS=ON - -DTALIPOT_USE_CCACHE=ON - -DTALIPOT_BUILD_DOC=OFF - -DTALIPOT_CODE_COVERAGE=ON - - name: Talipot build - working-directory: ./build - run: ninja -j4 - - name: Run Talipot unit tests - working-directory: ./build - run: xvfb-run ninja tests - - name: Generate and upload code coverage report - uses: threeal/gcovr-action@main - with: - excludes: | - build/* - library/talipot-gui/* - library/talipot-ogl/* - library/talipot-python/* - plugins/interactor/* - plugins/view/* - software/* - tests/* - thirdparty/* - utils/* - coveralls-send: true - github-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos-homebrew-build.yml b/.github/workflows/macos-homebrew-build.yml deleted file mode 100644 index 55e9764667..0000000000 --- a/.github/workflows/macos-homebrew-build.yml +++ /dev/null @@ -1,113 +0,0 @@ -name: macos-homebrew-build -on: [push, pull_request] -jobs: - macos: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - strategy: - fail-fast: false - matrix: - config: - - name: Talipot build on macOS 12 (x86_64) - os: macos-12 - pyver: "3.11" - homebrew_path: /usr/local - # - name: Talipot build on macOS 14 (arm64) - # os: macos-14 - # pyver: "3.11" - # homebrew_path: /opt/homebrew - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Install Talipot build dependencies - run: brew install - ccache - cmake - llvm - qhull - yajl - zstd - graphviz - libgit2 - python@${{ matrix.config.pyver }} - sip - cppunit - pkg-config - glew - freetype - fribidi - fontconfig - qt6 - quazip || brew link --overwrite python@${{ matrix.config.pyver }} - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: /Users/runner/Library/Caches/ccache - key: ${{ matrix.config.os }}-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - ${{ matrix.config.os }}-ccache- - save-always: true - - name: Create build directory - run: mkdir build - - name: Configure Talipot core build with CMake - working-directory: ./build - run: cmake .. -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DCMAKE_C_COMPILER=${{ matrix.config.homebrew_path }}/opt/llvm/bin/clang - -DCMAKE_CXX_COMPILER=${{ matrix.config.homebrew_path }}/opt/llvm/bin/clang++ - -DCMAKE_SHARED_LINKER_FLAGS="-L${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++ - -Wl,-rpath,${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++" - -DCMAKE_EXE_LINKER_FLAGS="-L${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++ - -Wl,-rpath,${{ matrix.config.homebrew_path }}/opt/llvm/lib/c++" - -DCMAKE_RANLIB=/usr/bin/ranlib - -DPython3_EXECUTABLE=${{ matrix.config.homebrew_path }}/opt/python@${{ matrix.config.pyver }}/bin/python${{ matrix.config.pyver }} - -DTALIPOT_BUILD_CORE_ONLY=ON - -DTALIPOT_BUILD_TESTS=ON - -DTALIPOT_BUILD_DOC=OFF - -DTALIPOT_USE_CCACHE=ON - - name: Talipot core build - working-directory: ./build - run: make -j4 - - name: Install Talipot core build - working-directory: ./build - run: make -j4 install - - name: Run Talipot core build unit tests - working-directory: ./build - run: make tests - - name: Configure Talipot complete build with CMake - working-directory: ./build - run: cmake . - -DTALIPOT_BUILD_CORE_ONLY=OFF - -DCMAKE_PREFIX_PATH=${{ matrix.config.homebrew_path }}/opt/qt6 - -DTALIPOT_USE_QT6=ON - - name: Talipot complete build - working-directory: ./build - run: make -j4 - - name: Install Talipot complete build - working-directory: ./build - run: make -j4 install - - name: Run Talipot complete build unit tests - working-directory: ./build - run: make tests - - name: Check Talipot application can be executed - working-directory: ./build/install/bin - run: ./talipot --check-application-starts --debug-plugins-load - - name: Generate Talipot dmg bundle - if: matrix.config.os == 'macos-12' || matrix.config.os == 'macos-14' - working-directory: ./build - run: make bundle - - name: Upload Talipot bundle to GitHub Actions artifacts - if: matrix.config.os == 'macos-12' || matrix.config.os == 'macos-14' - uses: actions/upload-artifact@v4 - with: - name: Talipot-macOS-bundles-${{ matrix.config.os }} - path: ./build/Talipot*.dmg diff --git a/.github/workflows/macos-macports-build.yml b/.github/workflows/macos-macports-build.yml deleted file mode 100644 index f4dfdb36db..0000000000 --- a/.github/workflows/macos-macports-build.yml +++ /dev/null @@ -1,136 +0,0 @@ -name: macos-macports-build -on: [push, pull_request] -jobs: - macos: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - env: - CLANG_VERSION: 17 - PYTHON_VERSION: "3.12" - strategy: - fail-fast: false - matrix: - config: - - name: Talipot build on macOS x86_64 - os: macos-11 - - name: Talipot build on macOS arm64 - os: macos-14 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Compute environment variable - run: | - PYTHON_VERSION_NO_DOT=$(echo $PYTHON_VERSION | sed 's/\.//') - echo "PYTHON_VERSION_NO_DOT=$PYTHON_VERSION_NO_DOT" >> $GITHUB_ENV - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: | - /Users/runner/Library/Caches/ccache - /Users/runner/.macports-ci-ccache - key: ${{ matrix.config.os }}-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - ${{ matrix.config.os }}-ccache- - save-always: true - - name: Install MacPorts - run: | - curl -LO https://raw.githubusercontent.com/GiovanniBussi/macports-ci/master/macports-ci - source ./macports-ci install - source ./macports-ci ccache - - name: Install Talipot build dependencies - run: sudo port -N install - cmake - clang-${{ env.CLANG_VERSION }} - ccache - zlib - qhull - yajl - zstd - graphviz - libgit2 - python${{ env.PYTHON_VERSION_NO_DOT }} - py${{ env.PYTHON_VERSION_NO_DOT }}-sip - pkgconfig - cppunit - freetype - fontconfig - fribidi - glew - qt5-qtbase - qt5-qttools - qt5-qtwebkit - quazip - py${{ env.PYTHON_VERSION_NO_DOT }}-pip - - name: Install Sphinx - run: pip-${{ env.PYTHON_VERSION }} install sphinx - - name: Save MacPorts ccache - run: source ./macports-ci ccache --save - - name: Create build directory - run: mkdir build - - name: Configure Talipot core build with CMake - working-directory: ./build - run: cmake .. -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-${{ env.CLANG_VERSION }} - -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-${{ env.CLANG_VERSION }} - -DCMAKE_SHARED_LINKER_FLAGS="-L/opt/local/libexec/llvm-${{ env.CLANG_VERSION }}/lib - -Wl,-rpath,/opt/local/libexec/llvm-${{ env.CLANG_VERSION }}/lib" - -DCMAKE_EXE_LINKER_FLAGS="-L/opt/local/libexec/llvm-${{ env.CLANG_VERSION }}/lib - -Wl,-rpath,/opt/local/libexec/llvm-${{ env.CLANG_VERSION }}/lib" - -DPython3_EXECUTABLE=/opt/local/bin/python${{ env.PYTHON_VERSION }} - -DTALIPOT_BUILD_TESTS=ON - -DTALIPOT_USE_CCACHE=ON - -DTALIPOT_BUILD_DOC=OFF - -DTALIPOT_BUILD_CORE_ONLY=ON - - name: Talipot core build - working-directory: ./build - run: make -j4 - - name: Install Talipot core build - working-directory: ./build - run: make -j4 install - - name: Run Talipot core build unit tests - working-directory: ./build - run: make tests - - name: Configure Talipot complete build with CMake - working-directory: ./build - run: cmake . - -DTALIPOT_BUILD_CORE_ONLY=OFF - -DTALIPOT_BUILD_DOC=ON - - name: Talipot complete build - working-directory: ./build - run: make -j4 - - name: Install Talipot complete build - working-directory: ./build - run: make -j4 install - - name: Run Talipot complete build unit tests - working-directory: ./build - run: make tests - - name: Check Talipot application can be executed - working-directory: ./build/install/bin - run: ./talipot --check-application-starts --debug-plugins-load - - name: Generate Talipot dmg bundle - working-directory: ./build - run: make bundle - - name: Upload Talipot bundle to GitHub Actions artifacts - uses: actions/upload-artifact@v4 - with: - name: Talipot-macOS-bundles-${{ matrix.config.os }} - path: ./build/Talipot*.dmg - - name: Upload Talipot bundle to dev-latest prerelease - if: github.ref == 'refs/tags/dev-latest' - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - name: Talipot development build - prerelease: true - artifacts: ./build/Talipot*.dmg - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/macos-macports-wheels-build.yml b/.github/workflows/macos-macports-wheels-build.yml deleted file mode 100644 index f224caabc8..0000000000 --- a/.github/workflows/macos-macports-wheels-build.yml +++ /dev/null @@ -1,156 +0,0 @@ -name: macos-macports-wheels-build -on: [push, pull_request] -jobs: - macos: - name: Talipot Python wheels build on macOS - runs-on: macos-11 - env: - CLANG_VERSION: 16 - MACOSX_DEPLOYMENT_TARGET: "11.0" - TWINE_REPOSITORY: https://test.pypi.org/legacy/ - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Get wheel next dev version - run: | - JSON=$(curl -s 'https://test.pypi.org/pypi/talipot/json') - LAST_VERSION=$(echo $JSON | python -c " - import sys, json - print(json.load(sys.stdin)['info']['version'])" 2>/dev/null) - - if [ $? -ne 0 ] - then - DEV_VERSION=1 - else - echo last wheel dev version = $LAST_VERSION - - # check if dev wheel version needs to be incremented - VERSION_INCREMENT=$(echo $JSON | python -c " - import sys, json - releases = json.load(sys.stdin)['releases']['$LAST_VERSION'] - print(any(['macosx' in r['filename'] for r in releases]))") - DEV_VERSION=$(echo $LAST_VERSION | cut -f4 -d '.' | sed 's/dev//') - - if [ "$VERSION_INCREMENT" == "True" ] - then - let DEV_VERSION+=1 - fi - fi - echo current wheel dev version = $DEV_VERSION - echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_ENV - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: | - /Users/runner/Library/Caches/ccache - /Users/runner/.macports-ci-ccache - key: macos-wheels-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - ${{ matrix.config.os }}-ccache- - save-always: true - - name: Install MacPorts - run: | - curl -LO https://raw.githubusercontent.com/anlambert/macports-ci/master/macports-ci - source ./macports-ci install - - name: Install Talipot build dependencies - run: sudo port -N install - cmake - clang-${{ env.CLANG_VERSION }} - bison - zlib - zstd - libomp - qhull - yajl - libgit2 - graphviz - - name: Install Python versions to build wheels against - run: | - curl -LO https://www.python.org/ftp/python/3.7.6/python-3.7.6-macosx10.9.pkg - sudo installer -pkg python-3.7.6-macosx10.9.pkg -target / - sudo /Library/Frameworks/Python.framework/Versions/3.7/bin/pip3 install wheel - curl -LO https://www.python.org/ftp/python/3.8.1/python-3.8.1-macosx10.9.pkg - sudo installer -pkg python-3.8.1-macosx10.9.pkg -target / - sudo /Library/Frameworks/Python.framework/Versions/3.8/bin/pip3 install wheel - curl -LO https://www.python.org/ftp/python/3.9.0/python-3.9.0-macosx10.9.pkg - sudo installer -pkg python-3.9.0-macosx10.9.pkg -target / - sudo /Library/Frameworks/Python.framework/Versions/3.9/bin/pip3 install wheel - curl -LO https://www.python.org/ftp/python/3.10.0/python-3.10.0post2-macos11.pkg - sudo installer -pkg python-3.10.0post2-macos11.pkg -target / - sudo /Library/Frameworks/Python.framework/Versions/3.10/bin/pip3 install wheel - curl -LO https://www.python.org/ftp/python/3.11.0/python-3.11.0-macos11.pkg - sudo installer -pkg python-3.11.0-macos11.pkg -target / - sudo /Library/Frameworks/Python.framework/Versions/3.11/bin/pip3 install wheel - sudo /Library/Frameworks/Python.framework/Versions/3.11/bin/pip3 install twine - - name: Create build directory - run: mkdir build - - name: Build Talipot Python wheels - working-directory: ./build - run: | - for py3Version in 3.8 3.9 3.10 3.11 - do - rm -f CMakeCache.txt || true - sudo /Library/Frameworks/Python.framework/Versions/$py3Version/bin/pip3 install sip - cmake .. -DCMAKE_BUILD_TYPE=Release \ - -DCMAKE_INSTALL_PREFIX=$PWD/install \ - -DCMAKE_C_COMPILER=/opt/local/bin/clang-mp-${{ env.CLANG_VERSION }} \ - -DCMAKE_CXX_COMPILER=/opt/local/bin/clang++-mp-${{ env.CLANG_VERSION }} \ - -DTALIPOT_ACTIVATE_PYTHON_WHEEL_TARGET=ON \ - -DTALIPOT_PYTHON_TEST_WHEEL_SUFFIX=a2.dev${{ env.DEV_VERSION }}\ - -DPython3_EXECUTABLE=/Library/Frameworks/Python.framework/Versions/$py3Version/bin/python3 \ - -DTALIPOT_USE_CCACHE=ON \ - -DTALIPOT_BUILD_CORE_ONLY=ON \ - -DTALIPOT_BUILD_DOC=OFF - make -j4 test-wheel - done - - name: Upload Talipot Python wheels on test PyPI - if: github.ref == 'refs/tags/dev-latest' - working-directory: ./build - run: make test-wheel-upload - - name: Test uploaded wheels in clean environment - if: github.ref == 'refs/tags/dev-latest' - run: | - sudo port -N -f uninstall \ - cmake \ - clang-${CLANG_VERSION} \ - qhull \ - yajl \ - libgit2 \ - graphviz - - sudo port -N install \ - python38 \ - py38-pip \ - python39 \ - py39-pip \ - python310 \ - py310-pip \ - python311 \ - py311-pip - - sudo pip-3.8 install --index-url https://test.pypi.org/simple/ talipot - python3.8 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" - python3.8 -c "from talipot import tlp; print(tlp.getImportPluginsList())" - - sudo pip-3.9 install --index-url https://test.pypi.org/simple/ talipot - python3.9 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" - python3.9 -c "from talipot import tlp; print(tlp.getImportPluginsList())" - - sudo pip-3.10 install --index-url https://test.pypi.org/simple/ talipot - python3.10 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" - python3.10 -c "from talipot import tlp; print(tlp.getImportPluginsList())" - - sudo pip-3.11 install --index-url https://test.pypi.org/simple/ talipot - python3.11 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" - python3.11 -c "from talipot import tlp; print(tlp.getImportPluginsList())" diff --git a/.github/workflows/manylinux-wheel-build.yml b/.github/workflows/manylinux-wheel-build.yml deleted file mode 100644 index feb271969b..0000000000 --- a/.github/workflows/manylinux-wheel-build.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: manylinux-wheel-build -on: [push, pull_request] -jobs: - manylinux: - name: Talipot manylinux Python wheel build on CentOS 7.9 - runs-on: ubuntu-20.04 - env: - DOCKER_IMAGE: quay.io/pypa/manylinux2014_x86_64 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Get current date - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: ~/ccache - key: manylinux2014-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - manylinux2014-ccache- - save-always: true - - name: Pull ${{ env.DOCKER_IMAGE }} docker image - run: docker pull ${DOCKER_IMAGE} - - name: Create ccache docker volume - run: docker create - -v ~/ccache:/ccache - --name ccache - ${DOCKER_IMAGE} - - name: Build and upload Talipot Python wheel - run: docker run - -e CCACHE_DIR=/ccache - --volumes-from ccache - -v `pwd`:/talipot:rw - ${DOCKER_IMAGE} - /bin/bash -c - "bash -x /talipot/bundlers/linux/talipot_python_wheels_manylinux_build.sh - ${{ secrets.TEST_PYPI_API_TOKEN }} - ${{ github.ref }}" - - name: Test uploaded wheel - if: github.ref == 'refs/tags/dev-latest' - working-directory: tests/python - run: | - # wait one minute to ensure freshly uploaded wheels are registered on PyPI - sleep 60 - - sudo apt install python3-pip - pip3 install --upgrade pip --user - pip3 install --index-url https://test.pypi.org/simple/ talipot --user - python3 -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())" - TALIPOT_BUILD_DIR= python3 -m unittest discover diff --git a/.github/workflows/ubuntu-build.yml b/.github/workflows/ubuntu-build.yml deleted file mode 100644 index ae6168df88..0000000000 --- a/.github/workflows/ubuntu-build.yml +++ /dev/null @@ -1,104 +0,0 @@ -name: ubuntu-build -on: [push, pull_request] -jobs: - ubuntu: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - strategy: - fail-fast: false - matrix: - config: - - name: Talipot build on Ubuntu 20.04 - os: ubuntu-20.04 - - name: Talipot build on Ubuntu 22.04 - os: ubuntu-22.04 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Apt update - run: sudo apt update - - name: Install Talipot build dependencies - run: sudo apt install - cmake - ccache - ninja-build - libqhull-dev - libyajl-dev - libgraphviz-dev - libpython3-dev - libcppunit-dev - binutils-dev - libzstd-dev - libgit2-dev - qtbase5-dev - libqt5webkit5-dev - libquazip5-dev - libglew-dev - libfreetype6-dev - libfribidi-dev - libfontconfig-dev - python3 - python3-pip - doxygen - graphviz - xvfb - - name: Install sip - run: | - sudo pip3 install --upgrade pip - sudo pip3 install sip - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: ~/.ccache - key: ${{ matrix.config.os }}-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - ${{ matrix.config.os }}-ccache- - save-always: true - - name: Create build directory - run: mkdir build - - name: Configure Talipot core build with CMake - working-directory: ./build - run: cmake .. -G Ninja - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DTALIPOT_BUILD_TESTS=ON - -DTALIPOT_USE_CCACHE=ON - -DTALIPOT_BUILD_CORE_ONLY=ON - -DTALIPOT_BUILD_DOC=OFF - - name: Talipot core build - working-directory: ./build - run: ninja -j4 - - name: Install Talipot core build - working-directory: ./build - run: ninja -j4 install - - name: Run Talipot core build unit tests - working-directory: ./build - run: ninja tests - - name: Install sphinx - run: sudo pip install sphinx - - name: Configure Talipot complete build with CMake - working-directory: ./build - run: cmake . - -DTALIPOT_BUILD_CORE_ONLY=OFF - -DTALIPOT_BUILD_DOC=ON - - name: Talipot complete build - working-directory: ./build - run: ninja -j4 - - name: Install Talipot complete build - working-directory: ./build - run: ninja -j4 install - - name: Run Talipot complete build unit tests - working-directory: ./build - run: xvfb-run ninja tests - - name: Check Talipot application can be executed - working-directory: ./build/install/bin - run: xvfb-run ./talipot --check-application-starts --debug-plugins-load diff --git a/.github/workflows/ubuntu-qt6-build.yml b/.github/workflows/ubuntu-qt6-build.yml deleted file mode 100644 index 3de24b50a2..0000000000 --- a/.github/workflows/ubuntu-qt6-build.yml +++ /dev/null @@ -1,93 +0,0 @@ -name: ubuntu-qt6-build -on: [push, pull_request] -jobs: - ubuntu: - name: ${{ matrix.config.name }} - runs-on: ${{ matrix.config.os }} - strategy: - fail-fast: false - matrix: - config: - - name: Talipot build Qt6 6.2 - os: ubuntu-22.04 - - name: Talipot build Qt6 latest - os: ubuntu-22.04 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - if: matrix.config.name == 'Talipot build Qt6 latest' - name: Add KDE Neon apt repository to use latest Qt6 release - run: | - wget -qO - http://archive.neon.kde.org/public.key | sudo apt-key add - - sudo add-apt-repository http://archive.neon.kde.org/user/ - sudo apt update - - name: Apt update - run: sudo apt update - - name: Install Talipot build dependencies - run: sudo apt install - cmake - ccache - curl - ninja-build - libqhull-dev - libyajl-dev - libgit2-dev - libgraphviz-dev - libpython3-dev - libcppunit-dev - binutils-dev - libzstd-dev - libglew-dev - libfreetype6-dev - libfribidi-dev - libfontconfig-dev - python3 - python3-pip - doxygen - graphviz - qt6-base-dev - libqt6core5compat6-dev - qt6-webengine-dev - qt6-webengine-dev-tools - xvfb - - name: Install sphinx and sip - run: sudo pip install sphinx sip - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - shell: bash - - name: Cache files - uses: actions/cache@v4 - with: - path: ~/.ccache - key: ubuntu-qt6-build-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - ubuntu-qt6-build-ccache- - save-always: true - - name: Create build directory - run: mkdir build - - name: Configure Talipot build with CMake - working-directory: ./build - run: cmake .. -G Ninja - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DTALIPOT_USE_QT6=ON - -DTALIPOT_BUILD_TESTS=ON - -DTALIPOT_USE_CCACHE=ON - - name: Talipot build - working-directory: ./build - run: ninja -j4 - - name: Install Talipot - working-directory: ./build - run: ninja -j4 install - - name: Run Talipot unit tests - working-directory: ./build - run: xvfb-run ninja tests - - name: Check Talipot application can be executed - working-directory: ./build/install/bin - run: xvfb-run ./talipot --check-application-starts --debug-plugins-load diff --git a/.github/workflows/windows-mingw64-build.yml b/.github/workflows/windows-mingw64-build.yml deleted file mode 100644 index 4295fb6928..0000000000 --- a/.github/workflows/windows-mingw64-build.yml +++ /dev/null @@ -1,115 +0,0 @@ -name: windows-mingw64-build -on: [push, pull_request] -jobs: - mingw64: - name: ${{ matrix.config.name }} - runs-on: windows-latest - defaults: - run: - shell: msys2 {0} - strategy: - fail-fast: false - matrix: - config: - - name: Talipot build on Windows (mingw64 GCC) - msystem: mingw64 - arch: x86_64 - - - name: Talipot build on Windows (mingw64 Clang) - msystem: clang64 - arch: clang-x86_64 - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Install mingw64 and Talipot build dependencies - uses: msys2/setup-msys2@v2 - with: - msystem: ${{ matrix.config.msystem }} - update: true - install: git - base-devel - mingw-w64-${{ matrix.config.arch }}-toolchain - mingw-w64-${{ matrix.config.arch }}-openmp - mingw-w64-${{ matrix.config.arch }}-cmake - mingw-w64-${{ matrix.config.arch }}-ccache - mingw-w64-${{ matrix.config.arch }}-yajl - mingw-w64-${{ matrix.config.arch }}-zstd - mingw-w64-${{ matrix.config.arch }}-qhull - mingw-w64-${{ matrix.config.arch }}-graphviz - mingw-w64-${{ matrix.config.arch }}-libgit2 - mingw-w64-${{ matrix.config.arch }}-python - mingw-w64-${{ matrix.config.arch }}-cppunit - mingw-w64-${{ matrix.config.arch }}-fontconfig - mingw-w64-${{ matrix.config.arch }}-freetype - mingw-w64-${{ matrix.config.arch }}-fribidi - mingw-w64-${{ matrix.config.arch }}-glew - mingw-w64-${{ matrix.config.arch }}-qt5 - mingw-w64-${{ matrix.config.arch }}-quazip - mingw-w64-${{ matrix.config.arch }}-qtwebkit - mingw-w64-${{ matrix.config.arch }}-python-sphinx - mingw-w64-${{ matrix.config.arch }}-sip - - if: matrix.config.msystem == 'clang64' - name: Patch CMake GetPrerequisites module until 3.29.0 release is out - run: sed -i 's/\\t\*DLL Name/\[\\t \]\*DLL Name/' - /clang64/share/cmake/Modules/GetPrerequisites.cmake - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - - name: Get ccache directory - id: get-cccache-dir - run: | - ccache_dir=$(ccache -sv | grep "Cache directory" | awk '{print $3}') - echo "ccache-dir=$ccache_dir" >> $GITHUB_OUTPUT - - name: Cache files - uses: actions/cache@v4 - with: - path: ${{ steps.get-cccache-dir.outputs.ccache-dir }} - key: windows-${{ matrix.config.arch }}-build-ccache-${{ steps.get-current-date.outputs.date }} - restore-keys: | - windows-${{ matrix.config.arch }}-build-ccache - save-always: true - - name: Create build directory - run: mkdir build - - name: Configure Talipot build with CMake - working-directory: ./build - run: cmake -G "MSYS Makefiles" - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_NEED_RESPONSE=ON - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DPython3_EXECUTABLE=/${{ matrix.config.msystem }}/bin/python3 - -DTALIPOT_BUILD_TESTS=ON - -DTALIPOT_USE_CCACHE=ON .. - - name: Talipot build - working-directory: ./build - run: make -j4 - - name: Install Talipot - working-directory: ./build - run: make -j4 install - - name: Run Talipot unit tests - working-directory: ./build - run: make tests - - name: Check Talipot application can be executed - working-directory: ./build/install/bin - run: ./talipot --check-application-starts --debug-plugins-load - - name: Generate Talipot NSIS installer - working-directory: ./build - run: make bundle - - name: Upload Talipot installer to GitHub Actions artifacts - uses: actions/upload-artifact@v4 - with: - name: Talipot-NSIS-installer-${{ matrix.config.msystem }} - path: ./build/Talipot*.exe - - name: Upload Talipot bundle to dev-latest prerelease - if: github.ref == 'refs/tags/dev-latest' - uses: ncipollo/release-action@v1 - with: - allowUpdates: true - name: Talipot development build - prerelease: true - artifacts: ./build/Talipot*.exe - token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows-msvc-build.yml b/.github/workflows/windows-msvc-build.yml new file mode 100644 index 0000000000..2e7760e4fb --- /dev/null +++ b/.github/workflows/windows-msvc-build.yml @@ -0,0 +1,96 @@ +name: windows-msvc-build +on: [push, pull_request] +jobs: + msvc: + name: Talipot build on Windows (MSVC) + runs-on: windows-latest + defaults: + run: + shell: cmd {0} + steps: + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.12.1 + with: + access_token: ${{ github.token }} + - name: Checkout Talipot code + uses: actions/checkout@v4 + - name: Prepare ccache timestamp + shell: msys2 {0} + id: get-current-date + run: | + echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT + # - name: Cache files + # uses: actions/cache@v4 + # with: + # path: ${{ steps.get-cccache-dir.outputs.ccache-dir }} + # key: windows-${{ matrix.config.arch }}-build-ccache-${{ steps.get-current-date.outputs.date }} + # restore-keys: | + # windows-${{ matrix.config.arch }}-build-ccache + # save-always: true + - name: Install build dependencies with vcpkg + uses: johnwason/vcpkg-action@v6 + id: vcpkg + with: + pkgs: zlib + zstd + qhull + yajl + graphviz + libgit2 + cppunit + freetype + glew + fontconfig + fribidi + triplet: x64-windows-release + token: ${{ github.token }} + github-binarycache: true + - name: Install Qt6 + uses: jurplel/install-qt-action@v3 + with: + version: "6.7.0" + host: windows + target: desktop + arch: win64_msvc2019_64 + modules: qtwebengine + cache: true + - name: Create build directory + run: mkdir build + # - name: Configure Talipot build with CMake + # working-directory: ./build + # run: cmake -G "MSYS Makefiles" + # -DCMAKE_BUILD_TYPE=Release + # -DCMAKE_NEED_RESPONSE=ON + # -DCMAKE_INSTALL_PREFIX=$PWD/install + # -DPython3_EXECUTABLE=/${{ matrix.config.msystem }}/bin/python3 + # -DTALIPOT_BUILD_TESTS=ON + # -DTALIPOT_USE_CCACHE=ON .. + # - name: Talipot build + # working-directory: ./build + # run: make -j4 + # - name: Install Talipot + # working-directory: ./build + # run: make -j4 install + # - name: Run Talipot unit tests + # working-directory: ./build + # run: make tests + # - name: Check Talipot application can be executed + # working-directory: ./build/install/bin + # run: ./talipot --check-application-starts --debug-plugins-load + # - name: Generate Talipot NSIS installer + # working-directory: ./build + # run: make bundle + # - name: Upload Talipot installer to GitHub Actions artifacts + # uses: actions/upload-artifact@v4 + # with: + # name: Talipot-NSIS-installer-${{ matrix.config.msystem }} + # path: ./build/Talipot*.exe + # - name: Upload Talipot bundle to dev-latest prerelease + # if: github.ref == 'refs/tags/dev-latest' + # uses: ncipollo/release-action@v1 + # with: + # allowUpdates: true + # name: Talipot development build + # prerelease: true + # artifacts: ./build/Talipot*.exe + # token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/windows-wheels-build.yml b/.github/workflows/windows-wheels-build.yml deleted file mode 100644 index 7c1e6a870d..0000000000 --- a/.github/workflows/windows-wheels-build.yml +++ /dev/null @@ -1,131 +0,0 @@ -name: windows-wheels-build -on: [push, pull_request] -jobs: - windows: - name: Talipot Python ${{ matrix.python-version }} wheel build on windows - runs-on: windows-latest - env: - TWINE_REPOSITORY: https://test.pypi.org/legacy/ - TWINE_USERNAME: __token__ - TWINE_PASSWORD: ${{ secrets.TEST_PYPI_API_TOKEN }} - defaults: - run: - shell: msys2 {0} - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11"] - steps: - - name: Cancel Previous Runs - uses: styfle/cancel-workflow-action@0.12.1 - with: - access_token: ${{ github.token }} - - name: Checkout Talipot code - uses: actions/checkout@v4 - - name: Install mingw64 and Talipot build dependencies - uses: msys2/setup-msys2@v2 - with: - msystem: MINGW64 - update: true - install: git - base-devel - mingw-w64-x86_64-toolchain - mingw-w64-x86_64-cmake - mingw-w64-x86_64-ccache - mingw-w64-x86_64-yajl - mingw-w64-x86_64-zstd - mingw-w64-x86_64-qhull - mingw-w64-x86_64-graphviz - mingw-w64-x86_64-libgit2 - - name: Install Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 - id: python-install - with: - python-version: ${{ matrix.python-version }} - - name: Install sip, twine and wheel Python packages - run: | - PYTHON_PATH=$(echo '${{ steps.python-install.outputs.python-path }}') - export PATH=$(cygpath -u "$(dirname $PYTHON_PATH)\Scripts"):$PATH - pip install sip twine wheel - - name: Get wheel next dev version - run: | - PYTHON_PATH=$(echo '${{ steps.python-install.outputs.python-path }}') - export PATH=$(cygpath -u "$(dirname $PYTHON_PATH)"):$PATH - JSON=$(curl -s 'https://test.pypi.org/pypi/talipot/json') - LAST_VERSION=$(echo $JSON | python -c " - import sys, json - print(json.load(sys.stdin)['info']['version'])" 2>/dev/null) - if [ $? -ne 0 ] - then - DEV_VERSION=1 - else - echo last wheel dev version = $LAST_VERSION - # check if dev wheel version needs to be incremented - VERSION_INCREMENT=$(echo $JSON | python -c " - import sys, json - releases = json.load(sys.stdin)['releases']['$LAST_VERSION'] - print(any(['win_amd64' in r['filename'] for r in releases]))") - DEV_VERSION=$(echo $LAST_VERSION | cut -f4 -d '.' | sed 's/dev//') - if [ "$VERSION_INCREMENT" == "True" ] - then - let DEV_VERSION+=1 - fi - fi - echo current wheel dev version = $DEV_VERSION - echo "DEV_VERSION=$DEV_VERSION" >> $GITHUB_ENV - - name: Prepare ccache timestamp - id: get-current-date - run: | - echo "date=$(date -u "+%Y-%m-%d-%H-%m-%S")" >> $GITHUB_OUTPUT - - name: Get ccache directory - id: get-cccache-dir - run: | - ccache_dir=$(ccache -sv | grep "Cache directory" | awk '{print $3}') - echo "ccache-dir=$ccache_dir" >> $GITHUB_OUTPUT - - name: Cache files - uses: actions/cache@v4 - with: - path: ${{ steps.get-cccache-dir.outputs.ccache-dir }} - key: - windows-wheel-${{ steps.python-install.outputs.python-version }}-build-ccache - -${{ steps.get-current-date.outputs.date }} - restore-keys: | - windows-wheel-${{ steps.python-install.outputs.python-version }}-build-ccache - save-always: true - - name: Create build directory - run: mkdir build - - name: Configure Talipot Python wheel build with CMake - working-directory: ./build - run: cmake .. -G "MSYS Makefiles" - -DCMAKE_BUILD_TYPE=Release - -DCMAKE_NEED_RESPONSE=ON - -DCMAKE_INSTALL_PREFIX=$PWD/install - -DTALIPOT_ACTIVATE_PYTHON_WHEEL_TARGET=ON - -DTALIPOT_PYTHON_TEST_WHEEL_SUFFIX=a2.dev${{ env.DEV_VERSION }} - -DPython3_EXECUTABLE=$(cygpath -u "${{ steps.python-install.outputs.python-path }}") - -DTALIPOT_USE_CCACHE=ON - -DTALIPOT_BUILD_CORE_ONLY=ON - -DTALIPOT_BUILD_DOC=OFF - - name: Talipot Python wheel build - working-directory: ./build - run: make -j4 test-wheel - - name: Upload Talipot Python wheel on test PyPI - if: github.ref == 'refs/tags/dev-latest' - working-directory: ./build - run: make test-wheel-upload - - name: Test uploaded wheel in clean environment - if: github.ref == 'refs/tags/dev-latest' - run: | - PYTHON_PATH=$(echo '${{ steps.python-install.outputs.python-path }}') - export PATH=$(cygpath -u "$(dirname $PYTHON_PATH)"):$PATH - export PATH=$(cygpath -u "$(dirname $PYTHON_PATH)\Scripts"):$PATH - pacman --noconfirm -Rc \ - mingw-w64-x86_64-toolchain \ - mingw-w64-x86_64-cmake \ - mingw-w64-x86_64-ccache \ - mingw-w64-x86_64-zlib \ - mingw-w64-x86_64-yajl \ - mingw-w64-x86_64-zstd \ - mingw-w64-x86_64-qhull \ - mingw-w64-x86_64-graphviz - pip install --index-url https://test.pypi.org/simple/ talipot - python -c "from talipot import tlp; print(tlp.getLayoutAlgorithmPluginsList())"