diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 000000000..f85888f3b --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,570 @@ +name: BuildLibOmexMeta + +on: + push: + branches: + - develop + pull_request: + branches: + - '**' + +jobs: + build_on_OSs: + name: ${{ matrix.platform.name }} libomexmeta build + strategy: + fail-fast: false + matrix: + platform: + - name: macos-15-intel-release + os_type: macos + os_name: macos-15-intel + build_type: Release + build_python: ON + - name: macos-15-intel-debug + os_type: macos + os_name: macos-15-intel + build_type: Debug + build_python: OFF + - name: macos-14-release + os_type: macos + os_name: macos-14 + build_type: Release + build_python: ON + - name: macos-14-debug + os_type: macos + os_name: macos-14 + build_type: Debug + build_python: OFF + - name: ubuntu-latest-release + os_type: ubuntu + os_name: ubuntu-latest + build_type: Release + build_python: ON + - name: ubuntu-latest-debug + os_type: ubuntu + os_name: ubuntu-latest + build_type: Debug + build_python: OFF + - name: windows-latest-release + os_type: windows + os_name: windows-latest + build_type: Release + build_python: ON + - name: windows-latest-debug + os_type: windows + os_name: windows-latest + build_type: Debug + build_python: OFF + - name: manylinux_2_28-release + os_type: manylinux + os_name: ubuntu-latest + container_image: quay.io/pypa/manylinux_2_28_x86_64 + build_type: Release + build_python: ON + build_tests: [ON] + build_plugins: [ON] + runs-on: ${{ matrix.platform.os_name }} + container: + image: ${{ matrix.platform.container_image || '' }} + + steps: + - name: Setup python versions + shell: bash + # v1 should be the earliest supported version, and v4 the latest. Tests are only run on v1 and v4. + run: | + echo "python_v1=3.10" >> $GITHUB_ENV + echo "python_v2=3.11" >> $GITHUB_ENV + echo "python_v3=3.12" >> $GITHUB_ENV + echo "python_v4=3.13" >> $GITHUB_ENV + echo "python_v1_name=v1" >> $GITHUB_ENV + echo "python_v2_name=v2" >> $GITHUB_ENV + echo "python_v3_name=v3" >> $GITHUB_ENV + echo "python_v4_name=v4" >> $GITHUB_ENV + + - name: Checkout LibOmexMeta + uses: actions/checkout@v4 + with: + submodules: True + + - name: Setup Python for non-Manylinux platforms + if: matrix.platform.build_python == 'ON' && matrix.platform.os_type != 'manylinux' + uses: actions/setup-python@v5 + id: four_pythons + with: + python-version: | + ${{ env.python_v1 }} + ${{ env.python_v2 }} + ${{ env.python_v3 }} + ${{ env.python_v4 }} + + - name: Setup Python for Manylinux platforms + if: matrix.platform.build_python == 'ON' && matrix.platform.os_type == 'manylinux' + shell: bash + run: | + dnf install -y wget + wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh + bash Miniconda3-latest-Linux-x86_64.sh -b -p /Miniconda3 + + /Miniconda3/bin/conda create -y --name ${{ env.python_v1_name }} python=${{ env.python_v1 }} + /Miniconda3/bin/conda create -y --name ${{ env.python_v2_name }} python=${{ env.python_v2 }} + /Miniconda3/bin/conda create -y --name ${{ env.python_v3_name }} python=${{ env.python_v3 }} + /Miniconda3/bin/conda create -y --name ${{ env.python_v4_name }} python=${{ env.python_v4 }} + + /Miniconda3/bin/conda init && bash ~/.bashrc && . ~/.bashrc cd ${RUNNER_WORKSPACE} + # sed -i 's/PKG_CONFIG openssl /PKG_CONFIG openssl11 /g' configure + + echo "python_v1_exe=/Miniconda3/envs/${{ env.python_v1_name }}/bin/python" >> $GITHUB_ENV + echo "python_v1_dir=/Miniconda3/envs/${{ env.python_v1_name }}" >> $GITHUB_ENV + echo "python_v2_exe=/Miniconda3/envs/${{ env.python_v2_name }}/bin/python" >> $GITHUB_ENV + echo "python_v2_dir=/Miniconda3/envs/${{ env.python_v2_name }}" >> $GITHUB_ENV + echo "python_v3_exe=/Miniconda3/envs/${{ env.python_v3_name }}/bin/python" >> $GITHUB_ENV + echo "python_v3_dir=/Miniconda3/envs/${{ env.python_v3_name }}" >> $GITHUB_ENV + echo "python_v4_exe=/Miniconda3/envs/${{ env.python_v4_name }}/bin/python" >> $GITHUB_ENV + echo "python_v4_dir=/Miniconda3/envs/${{ env.python_v4_name }}" >> $GITHUB_ENV + + - name: Setup Windows Python paths + if: matrix.platform.build_python == 'ON' && matrix.platform.os_type == 'windows' + run: | + cd ${{ env.pythonLocation }} + $pattern = '[\\]' + + cd ../../${{ env.python_v1 }}*/x64/ + $pythonWinExecutable = $(realpath .) + $pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/' + echo "python_v1_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "python_v1_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append + + cd ../../${{ env.python_v2 }}*/x64/ + $pythonWinExecutable = $(realpath .) + $pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/' + echo "python_v2_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "python_v2_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append + + cd ../../${{ env.python_v3 }}*/x64/ + $pythonWinExecutable = $(realpath .) + $pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/' + echo "python_v3_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "python_v3_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append + + cd ../../${{ env.python_v4 }}*/x64/ + $pythonWinExecutable = $(realpath .) + $pythonWinExecutable = $pythonWinExecutable -replace $pattern, '/' + echo "python_v4_exe=$pythonWinExecutable/python.exe" | Out-File -FilePath $env:GITHUB_ENV -Append + echo "python_v4_dir=$pythonWinExecutable" | Out-File -FilePath $env:GITHUB_ENV -Append + + - name: Setup non-windows Python paths + if: matrix.platform.build_python == 'ON' && matrix.platform.os_type != 'windows' && matrix.platform.os_type != 'manylinux' + shell: bash + run: | + cd ${{ env.pythonLocation }} + export py_lastdir="$(basename $PWD)" + + cd ../../${{ env.python_v1 }}*/$py_lastdir/ + ls + echo "python_v1_exe=$PWD/python" >> $GITHUB_ENV + echo "python_v1_dir=$PWD" >> $GITHUB_ENV + + cd ../../${{ env.python_v2 }}*/$py_lastdir/ + echo "python_v2_exe=$PWD/python" >> $GITHUB_ENV + echo "python_v2_dir=$PWD" >> $GITHUB_ENV + + cd ../../${{ env.python_v3 }}*/$py_lastdir/ + echo "python_v3_exe=$PWD/python" >> $GITHUB_ENV + echo "python_v3_dir=$PWD" >> $GITHUB_ENV + + cd ../../${{ env.python_v4 }}*/$py_lastdir/ + echo "python_v4_exe=$PWD/python" >> $GITHUB_ENV + echo "python_v4_dir=$PWD" >> $GITHUB_ENV + + + - name: Install Python dependencies + if: matrix.platform.build_python == 'ON' + shell: bash + run: | + ${{ env.python_v1_exe }} -m pip install --upgrade pip + ${{ env.python_v1_exe }} -m pip install -r ./requirements.txt + ${{ env.python_v1_exe }} -m pip install -r ./test-requirements.txt + ${{ env.python_v1_exe }} -m pip install build + ${{ env.python_v2_exe }} -m pip install --upgrade pip + ${{ env.python_v2_exe }} -m pip install -r ./requirements.txt + ${{ env.python_v2_exe }} -m pip install -r ./test-requirements.txt + ${{ env.python_v2_exe }} -m pip install build + ${{ env.python_v3_exe }} -m pip install --upgrade pip + ${{ env.python_v3_exe }} -m pip install -r ./requirements.txt + ${{ env.python_v3_exe }} -m pip install -r ./test-requirements.txt + ${{ env.python_v3_exe }} -m pip install build + ${{ env.python_v4_exe }} -m pip install --upgrade pip + ${{ env.python_v4_exe }} -m pip install -r ./requirements.txt + ${{ env.python_v4_exe }} -m pip install -r ./test-requirements.txt + ${{ env.python_v4_exe }} -m pip install build + # At one point, we needed this on manylinux: + # ${{ env.python_v1_exe }} -m pip install --trusted-host pypi.org --trusted-host pypi.python.org --trusted-host files.pythonhosted.org -r requirements.txt + + - name: Set Python root dir + shell: bash + run: | + echo PYTHON_DIR="-DPython_ROOT_DIR=${{ env.python_v1_dir }}" >> $GITHUB_ENV + + - name: Set MSVC as the default compiler on Windows + if: matrix.platform.os_type == 'windows' + uses: ilammy/msvc-dev-cmd@v1 + + - name: Upgrade gcc on Linux + if: matrix.platform.os_type == 'manylinux' + shell: bash + run: | + if [ "${{ matrix.platform.os_type }}" == 'ubuntu' ]; then + apt-get update + apt-get install -y software-properties-common + add-apt-repository -y ppa:ubuntu-toolchain-r/test + apt-get update + apt-get install -y gcc-11 g++-11 + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 90 + update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-11 90 + elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then + dnf install -y gcc-toolset-11 + scl enable gcc-toolset-11 bash + echo "/opt/rh/gcc-toolset-11/root/usr/bin" >> "${GITHUB_PATH}" + fi + + - name: Setup Ninja + uses: seanmiddleditch/gha-setup-ninja@master + + - name: Get Host Architecture + shell: bash + run: | + architecture=$(uname -m) + echo "host_architecture=$architecture" >> $GITHUB_ENV + if [ "${{ matrix.platform.os_type }}" == 'macos' ]; then + echo "OSX_ARCHITECTURES=$architecture" >> $GITHUB_ENV + fi + + - name: Install ccache + shell: bash + run: | + cd ${RUNNER_WORKSPACE} + if [ "${{ matrix.platform.os_type }}" == 'macos' ]; then + brew install ccache + elif [ "${{ matrix.platform.os_type }}" == 'ubuntu' ]; then + sudo apt-get update + sudo apt-get install -y ccache + elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then + mkdir -p ccache + cd ccache + curl -L https://github.com/ccache/ccache/releases/download/v4.9.1/ccache-4.9.1.tar.gz > ccache.tar.gz + tar -zxf ccache.tar.gz + rm ccache.tar.gz + mkdir -p build-ccache + mkdir -p install-ccache + cd build-ccache + cmake -DCMAKE_INSTALL_PREFIX="$RUNNER_WORKSPACE/ccache/install-ccache" -DCMAKE_BUILD_TYPE=Release ../ccache-4.9.1 + cmake --build . --target install + echo "$RUNNER_WORKSPACE/ccache/install-ccache/bin" >> "${GITHUB_PATH}" + fi + + - name: Prepare ccache timestamp on non-Windows platforms + if: matrix.platform.os_type != 'windows' + id: ccache_cache_timestamp + shell: cmake -P {0} + run: | + string(TIMESTAMP current_date "%Y-%m-%d-%H;%M;%S" UTC) + message("timestamp=${current_date}" >> $GITHUB_OUTPUT) + # message("::set-output name=timestamp::${current_date}") + + - name: Set ccache cache directory on non-Windows + if: matrix.platform.os_type != 'windows' + shell: bash + run: | + cd ${RUNNER_WORKSPACE} + echo "CCACHE_DIR=${RUNNER_WORKSPACE}/.ccache" >> $GITHUB_ENV + echo "COMPILER_LAUNCHER=ccache" >> $GITHUB_ENV + + - name: Cache ccache files on non-Windows + if: matrix.platform.os_type != 'windows' + uses: actions/cache@main + with: + path: ${RUNNER_WORKSPACE}/.ccache + key: + ${{ runner.os }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + restore-keys: | + ${{ runner.os }}-${{ steps.ccache_cache_timestamp.outputs.timestamp }} + ${{ runner.os }}- + + - name: Tell git it's OK to mess with working directory + if: matrix.platform.os_type == 'manylinux' + shell: bash + run: | + git config --global --add safe.directory ${{ github.workspace }} + + - name: Setup vcpkg + uses: lukka/run-vcpkg@main + with: + # This is the default location of the directory containing vcpkg sources. + # Change it to the right location if needed. + vcpkgDirectory: '${{ github.workspace }}/third_party/vcpkg' + runVcpkgInstall: true + + #- name: Install vcpkg modules. + # shell: bash + # run: vcpkg install curl pcre openssl yajl sqlite3 liblzma + + - name: Save standardized os/compiler names + shell: bash + run: | + if [ "${{ matrix.platform.os_type }}" == 'windows' ]; then + compiler_version=$(ls "C:\Program Files\Microsoft Visual Studio") + echo "os_and_compiler=${{ matrix.platform.os_type }}-msvc$compiler_version" >> $GITHUB_ENV + elif [ "${{ matrix.platform.os_type }}" == 'macos' ]; then + os_version=$(sw_vers -productVersion | cut -d '.' -f 1) + echo "os_and_compiler=${{ matrix.platform.os_type }}-${os_version}" >> $GITHUB_ENV + elif [ "${{ matrix.platform.os_type }}" == 'ubuntu' ]; then + os_version=$(lsb_release -rs | cut -d '.' -f 1) + echo "os_and_compiler=${{ matrix.platform.os_type }}-${os_version}" >> $GITHUB_ENV + elif [ "${{ matrix.platform.os_type }}" == 'manylinux' ]; then + os_name="${{ matrix.platform.name }}" + os_name_without_build_type="${os_name%%-*}" + echo "os_and_compiler=${os_name_without_build_type}" >> $GITHUB_ENV + fi + + - name: Create build directory + shell: bash + run: mkdir -p ${RUNNER_WORKSPACE}/build-libomexmeta + + # - name: Run CMake consuming CMakePreset.json and run vcpkg to build packages + # uses: lukka/run-cmake@v10 + # with: + # # This is the default path to the CMakeLists.txt along side the + # # CMakePresets.json. Change if you need have CMakeLists.txt and CMakePresets.json + # # located elsewhere. + # # cmakeListsTxtPath: '${{ github.workspace }}/CMakeLists.txt' + + # # You could use CMake workflow presets defined in the CMakePresets.json + # # with just this line below. Note this one cannot be used with any other + # # preset input, it is mutually exclusive. + # # workflowPreset: 'workflow-name' + + # # This is the name of the CMakePresets.json's configuration to use to generate + # # the project files. This configuration leverages the vcpkg.cmake toolchain file to + # # run vcpkg and install all dependencies specified in vcpkg.json. + # configurePreset: 'ninja-multi-vcpkg' + # # Additional arguments can be appended to the cmake command. + # # This is useful to reduce the number of CMake's Presets since you can reuse + # # an existing preset with different variables. + # configurePresetAdditionalArgs: "['-DENABLE_YOUR_FEATURE=1', '-DVCPKG_ROOT=${{ env.VCPKG_ROOT }}','-DCMAKE_INSTALL_PREFIX=\"${RUNNER_WORKSPACE}/install-libomexmeta\"', '-DBUILD_TESTS=ON', '-DCMAKE_BUILD_TYPE=Release', '-DBUILD_PYTHON=ON', '-DPython_ROOT_DIR=${{ env.python_v1_dir }}', -DBUILD_DOCS=OFF', '-DBUILD_DOCS_EXAMPLES=ON', '-DSPHINX_EXECUTABLE=$(which sphinx-build)', ]" + + # # This is the name of the CMakePresets.json's configuration to build the project. + # buildPreset: 'ninja-multi-vcpkg' + # # Additional arguments can be appended when building, for example to specify the + # # configuration to build. + # # This is useful to reduce the number of CMake's Presets you need in CMakePresets.json. + # buildPresetAdditionalArgs: "['--config ${{ matrix.platform.build_type }}']" + + # # This is the name of the CMakePresets.json's configuration to test the project with. + # testPreset: 'ninja-multi-vcpkg' + # # Additional arguments can be appended when testing, for example to specify the config + # # to test. + # # This is useful to reduce the number of CMake's Presets you need in CMakePresets.json. + # testPresetAdditionalArgs: "['--config ${{ matrix.platform.build_type }}']" + + - name: Configure CMake for libomexmeta + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/build-libomexmeta + cmake $GITHUB_WORKSPACE \ + -DVCPKG_ROOT='${{ env.VCPKG_ROOT }}' \ + -DCMAKE_INSTALL_PREFIX="${RUNNER_WORKSPACE}/install-libomexmeta" \ + -DBUILD_TESTS=ON \ + -DCMAKE_BUILD_TYPE=Release \ + -DBUILD_PYTHON=${{ env.build_python }} \ + -DPython_ROOT_DIR=${{ env.python_v1_dir }} \ + -DBUILD_DOCS=OFF \ + -DBUILD_DOCS_EXAMPLES=ON \ + -DSPHINX_EXECUTABLE=$(which sphinx-build) \ + + - name: Build and install libomexmeta + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/build-libomexmeta + cmake --build . --target install --config ${{ matrix.platform.build_type }} + + - name: Run C libomexmeta tests + if: matrix.platform.build_type == 'Release' && matrix.build_tests == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/build-libomexmeta + ctest --output-on-failure --verbose --extra-verbose --progress --exclude-regex python_tests + #if [ "${{ matrix.platform.os_name }}" != 'macos-14' ]; then + # ctest --output-on-failure --verbose --extra-verbose --progress --exclude-regex python_tests + #fi + + - name: Run Python libomexmeta tests (first Python version) + if: matrix.platform.build_python == 'ON' && matrix.build_tests == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/build-libomexmeta + if [ "${{ matrix.platform.os_name }}" != 'macos-14' ]; then /8 + ctest -C ${{ matrix.platform.build_type }} --output-on-failure --verbose --extra-verbose --progress --tests-regex python_tests + fi + + + - name: Save libomexmeta version + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/install-libomexmeta + ls -l + export rrversion="$(cat VERSION.txt)" + echo "libomexmeta_version=$rrversion" >> ${GITHUB_ENV} + + - name: Set artifacts path and name + shell: bash + run: | + cd ${RUNNER_WORKSPACE} + echo "artifacts_name=libomexmeta-${{ env.libomexmeta_version}}-${{ env.os_and_compiler }}-${host_architecture}-${{ matrix.platform.build_type }}" >> $GITHUB_ENV + echo "artifacts_path=${RUNNER_WORKSPACE}/install-libomexmeta" >> $GITHUB_ENV + + - name: Upload libomexmeta binaries + uses: actions/upload-artifact@main + with: + name: ${{ env.artifacts_name }} + path: ${{ env.artifacts_path }} + + - name: Create Python wheel artifacts + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/install-libomexmeta + ${{ env.python_v1_exe }} -m build --wheel + rm -r -f build + mv setup_rrplugins.py setup.py + ${{ env.python_v1_exe }} -m build --wheel + rm -r -f build + + - name: Rename Python wheel artifacts + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + shell: bash + run: | + mkdir ${RUNNER_WORKSPACE}/wheels/ + cd ${RUNNER_WORKSPACE}/install-libomexmeta/dist + if compgen -G "*universal*whl" > /dev/null; then + mv libomexmeta*universal*.whl $(echo libomexmeta*universal*.whl | sed "s/universal2/${host_architecture}/g") + mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g") + elif compgen -G "*-linux*whl" > /dev/null; then + mv libomexmeta*-linux*.whl $(echo libomexmeta*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + fi + mv * ${RUNNER_WORKSPACE}/wheels/ + + - name: Rebuild libomexmeta with second Python version + if: matrix.platform.build_python == 'ON' + shell: bash + run: | + rm -r -f ${RUNNER_WORKSPACE}/install-libomexmeta + cd ${RUNNER_WORKSPACE}/build-libomexmeta + cmake $GITHUB_WORKSPACE -DPython_ROOT_DIR=${{ env.python_v2_dir }} + cmake --build . --target install --config ${{ matrix.platform.build_type }} + + - name: Create second Python wheel artifacts and rename + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/install-libomexmeta + ${{ env.python_v2_exe }} -m build --wheel + rm -r -f build + mv setup_rrplugins.py setup.py + ${{ env.python_v2_exe }} -m build --wheel + rm -r -f build + cd ${RUNNER_WORKSPACE}/install-libomexmeta/dist + if compgen -G "*universal*whl" > /dev/null; then + mv libomexmeta*universal*.whl $(echo libomexmeta*universal*.whl | sed "s/universal2/${host_architecture}/g") + mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g") + elif compgen -G "*-linux*whl" > /dev/null; then + mv libomexmeta*-linux*.whl $(echo libomexmeta*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + fi + mv * ${RUNNER_WORKSPACE}/wheels/ + + + - name: Rebuild libomexmeta with third Python version + if: matrix.platform.build_python == 'ON' + shell: bash + run: | + rm -r -f ${RUNNER_WORKSPACE}/install-libomexmeta + cd ${RUNNER_WORKSPACE}/build-libomexmeta + cmake $GITHUB_WORKSPACE -DPython_ROOT_DIR=${{ env.python_v3_dir }} + cmake --build . --target install --config ${{ matrix.platform.build_type }} + + - name: Create third Python wheel artifacts and rename + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/install-libomexmeta + ${{ env.python_v3_exe }} -m build --wheel + rm -r -f build + mv setup_rrplugins.py setup.py + ${{ env.python_v3_exe }} -m build --wheel + rm -r -f build + cd ${RUNNER_WORKSPACE}/install-libomexmeta/dist + if compgen -G "*universal*whl" > /dev/null; then + mv libomexmeta*universal*.whl $(echo libomexmeta*universal*.whl | sed "s/universal2/${host_architecture}/g") + mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g") + elif compgen -G "*-linux*whl" > /dev/null; then + mv libomexmeta*-linux*.whl $(echo libomexmeta*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + fi + mv * ${RUNNER_WORKSPACE}/wheels/ + + + - name: Rebuild libomexmeta with fourth Python version + if: matrix.platform.build_python == 'ON' + shell: bash + run: | + rm -r -f ${RUNNER_WORKSPACE}/install-libomexmeta + cd ${RUNNER_WORKSPACE}/build-libomexmeta + cmake $GITHUB_WORKSPACE -DPython_ROOT_DIR=${{ env.python_v4_dir }} + cmake --build . --target install --config ${{ matrix.platform.build_type }} + + - name: Run Python libomexmeta tests (fourth Python version) + if: matrix.platform.build_python == 'ON' && matrix.build_tests == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/build-libomexmeta + if [ "${{ matrix.platform.os_name }}" != 'macos-14' ]; then + ctest -C ${{ matrix.platform.build_type }} --output-on-failure --verbose --extra-verbose --progress --tests-regex python_tests + fi + + + - name: Create fourth Python wheel artifacts and rename + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE}/install-libomexmeta + ${{ env.python_v4_exe }} -m build --wheel + rm -r -f build + mv setup_rrplugins.py setup.py + ${{ env.python_v4_exe }} -m build --wheel + rm -r -f build + cd ${RUNNER_WORKSPACE}/install-libomexmeta/dist + if compgen -G "*universal*whl" > /dev/null; then + mv libomexmeta*universal*.whl $(echo libomexmeta*universal*.whl | sed "s/universal2/${host_architecture}/g") + mv rrplugins*universal*.whl $(echo rrplugins*universal*.whl | sed "s/universal2/${host_architecture}/g") + elif compgen -G "*-linux*whl" > /dev/null; then + mv libomexmeta*-linux*.whl $(echo libomexmeta*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + mv rrplugins*-linux*.whl $(echo rrplugins*-linux*.whl | sed "s/-linux/-manylinux_2_28/g") + fi + mv * ${RUNNER_WORKSPACE}/wheels/ + + + - name: Set Python wheel artifacts path and name + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + shell: bash + run: | + cd ${RUNNER_WORKSPACE} + echo "libomexmeta_python_wheel_artifacts_name=libomexmeta-$libomexmeta_version-python-wheels-${{ env.os_and_compiler }}-${host_architecture}" >> $GITHUB_ENV + echo "libomexmeta_python_wheel_artifacts_file=${RUNNER_WORKSPACE}/wheels/" >> ${GITHUB_ENV} + + - name: Upload libomexmeta Python wheel artifacts + if: matrix.platform.build_type == 'Release' && matrix.platform.build_python == 'ON' + uses: actions/upload-artifact@main + with: + name: ${{ env.libomexmeta_python_wheel_artifacts_name }} + path: ${{ env.libomexmeta_python_wheel_artifacts_file }} diff --git a/.gitmodules b/.gitmodules index 6593fc9e7..8c421b4e7 100644 --- a/.gitmodules +++ b/.gitmodules @@ -16,3 +16,6 @@ [submodule "third_party/spdlog"] path = third_party/spdlog url = https://github.com/gabime/spdlog.git +[submodule "third_party/vcpkg"] + path = third_party/vcpkg + url = https://github.com/microsoft/vcpkg diff --git a/third_party/vcpkg b/third_party/vcpkg new file mode 160000 index 000000000..d9ccd77bb --- /dev/null +++ b/third_party/vcpkg @@ -0,0 +1 @@ +Subproject commit d9ccd77bb554e67137f3f754a2e2f11f4188c82c diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 000000000..db26555a0 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "dependencies": [ + "curl", + "pcre", + "openssl", + "yajl", + "sqlite3", + "liblzma" + ] +} \ No newline at end of file