From 3c1143018ac885387a8c4457d1dad95af6cf1d46 Mon Sep 17 00:00:00 2001 From: Andrey Parfenov Date: Wed, 3 Jul 2024 07:28:10 +0200 Subject: [PATCH] fixing ci, macos 11 runners are removed from github actions (#732) * fixing ci Signed-off-by: Andrey Parfenov * bump manylinux Signed-off-by: Andrey Parfenov * fixing cmake path in manylinux * fixing macos runners Signed-off-by: Andrey Parfenov * fixing deprecated warning in macos Signed-off-by: Andrey Parfenov --------- Signed-off-by: Andrey Parfenov --- .github/workflows/deploy_cpp_libs.yml | 13 ++++++------- .github/workflows/run_unix.yml | 18 +++++++++--------- .github/workflows/test_release.yml | 6 +++--- CMakeLists.txt | 2 +- 4 files changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/deploy_cpp_libs.yml b/.github/workflows/deploy_cpp_libs.yml index 202bcea52..70f8285b7 100644 --- a/.github/workflows/deploy_cpp_libs.yml +++ b/.github/workflows/deploy_cpp_libs.yml @@ -59,7 +59,7 @@ jobs: max-parallel: 16 matrix: build_type: [Release, Debug] - os: [ubuntu-latest, macos-11.0] + os: [ubuntu-latest, macos-12] steps: - name: Clone Repository @@ -69,13 +69,13 @@ jobs: with: cmake-version: '3.21.x' - name: Install Ninja - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') uses: seanmiddleditch/gha-setup-ninja@master with: version: 1.10.2 # build simpleble outside from brainflow because of different deployment targets - name: Compile SimpleBLE MacOS - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') run: | mkdir $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build cd $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build @@ -86,7 +86,7 @@ jobs: env: BUILD: ${{ matrix.build_type }} - name: Compile BrainFlow for MacOS - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') run: | mkdir $GITHUB_WORKSPACE/build cd $GITHUB_WORKSPACE/build @@ -99,9 +99,8 @@ jobs: - name: Compile BrainFlow in ManyLinux if: (matrix.os == 'ubuntu-latest') run: | - docker pull dockcross/manylinux2014-x64:20210708-94745ff - docker run -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -e BUILD=$BUILD -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE dockcross/manylinux2014-x64:20210708-94745ff /bin/bash -c "yum install -y bluez-libs-devel dbus-devel && /opt/python/cp36-cp36m/bin/pip3.6 install cmake==3.21.4 && cd $GITHUB_WORKSPACE && mkdir build_docker && cd build_docker && /opt/_internal/cpython-3.6.14/bin/cmake -DBUILD_BLE=ON -DBUILD_BLUETOOTH=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/artifacts/linux_${BUILD} -DCMAKE_BUILD_TYPE=$BUILD .. && make && make install" - + docker pull dockcross/manylinux_2_28-x64:20240418-88c04a4 + docker run -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -e BUILD=$BUILD -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE dockcross/manylinux_2_28-x64:20240418-88c04a4 /bin/bash -c "yum install -y bluez-libs-devel dbus-devel && /opt/python/cp36-cp36m/bin/pip3.6 install cmake==3.21.4 && cd $GITHUB_WORKSPACE && mkdir build_docker && cd build_docker && /opt/_internal/cpython-3.6.15/bin/cmake -DBUILD_BLE=ON -DBUILD_BLUETOOTH=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/artifacts/linux_${BUILD} -DCMAKE_BUILD_TYPE=$BUILD .. && make && make install" env: BUILD: ${{ matrix.build_type }} - name: Upload Artifacts diff --git a/.github/workflows/run_unix.yml b/.github/workflows/run_unix.yml index e8eeaeb59..5d50a781d 100644 --- a/.github/workflows/run_unix.yml +++ b/.github/workflows/run_unix.yml @@ -10,7 +10,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - os: [ubuntu-20.04, macos-11.0] + os: [ubuntu-20.04, macos-12] steps: # compile and prepare env @@ -45,7 +45,7 @@ jobs: run: | npm install -g ts-node - name: Install Ninja - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') uses: seanmiddleditch/gha-setup-ninja@master with: version: 1.10.2 @@ -63,7 +63,7 @@ jobs: java-version: 11.0.3 # build simpleble outside from brainflow because of different deployment targets - name: Compile SimpleBLE MacOS - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') run: | mkdir $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build cd $GITHUB_WORKSPACE/third_party/SimpleBLE/simpleble/build @@ -71,7 +71,7 @@ jobs: ninja ninja install - name: Compile BrainFlow MacOS - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') run: | mkdir $GITHUB_WORKSPACE/build cd $GITHUB_WORKSPACE/build @@ -94,8 +94,8 @@ jobs: # bindings in production have to use libraries compiled inside this image! if: (matrix.os == 'ubuntu-20.04') run: | - docker pull dockcross/manylinux2014-x64:20210708-94745ff - docker run -e BRAINFLOW_VERSION=$BRAINFLOW_VERSION -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE dockcross/manylinux2014-x64:20210708-94745ff /bin/bash -c "yum install -y bluez-libs-devel dbus-devel && /opt/python/cp36-cp36m/bin/pip3.6 install cmake==3.21.4 && cd $GITHUB_WORKSPACE && mkdir build_docker && cd build_docker && /opt/_internal/cpython-3.6.14/bin/cmake -DBRAINFLOW_VERSION=$BRAINFLOW_VERSION -DBUILD_ONNX=ON -DBUILD_BLE=ON -DBUILD_BLUETOOTH=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed_docker -DCMAKE_BUILD_TYPE=Release .. && make && make install" + docker pull dockcross/manylinux_2_28-x64:20240418-88c04a4 + docker run -e BRAINFLOW_VERSION=$BRAINFLOW_VERSION -e GITHUB_WORKSPACE=$GITHUB_WORKSPACE -v $GITHUB_WORKSPACE:$GITHUB_WORKSPACE dockcross/manylinux_2_28-x64:20240418-88c04a4 /bin/bash -c "yum install -y bluez-libs-devel dbus-devel && /opt/python/cp36-cp36m/bin/pip3.6 install cmake==3.21.4 && cd $GITHUB_WORKSPACE && mkdir build_docker && cd build_docker && /opt/_internal/cpython-3.6.15/bin/cmake -DBRAINFLOW_VERSION=$BRAINFLOW_VERSION -DBUILD_ONNX=ON -DBUILD_BLE=ON -DBUILD_BLUETOOTH=ON -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/installed_docker -DCMAKE_BUILD_TYPE=Release .. && make && make install" env: BRAINFLOW_VERSION: ${{ steps.version.outputs.version }} - name: C# build @@ -154,7 +154,7 @@ jobs: - name: Run unit tests run: $GITHUB_WORKSPACE/build/tests/brainflow_tests - name: Synthetic C# Test MacOS - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') run: | cd $GITHUB_WORKSPACE/csharp_package/brainflow/examples/brainflow_get_data/bin/Release/net7.0 cp $GITHUB_WORKSPACE/installed/lib/libBoardController.dylib $GITHUB_WORKSPACE/csharp_package/brainflow/examples/brainflow_get_data/bin/Release/net7.0/ @@ -164,7 +164,7 @@ jobs: LD_LIBRARY_PATH: ${{ github.workspace }}/installed/lib DYLD_LIBRARY_PATH: ${{ github.workspace }}/installed/lib - name: EEG Metrics C# Test MacOS - if: (matrix.os == 'macos-11.0') + if: (matrix.os == 'macos-12') run: | cd $GITHUB_WORKSPACE/csharp_package/brainflow/examples/eeg_metrics/bin/Release/net7.0 cp $GITHUB_WORKSPACE/installed/lib/libBoardController.dylib $GITHUB_WORKSPACE/csharp_package/brainflow/examples/eeg_metrics/bin/Release/net7.0/ @@ -409,7 +409,7 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} - name: Push Libraries MacOS Dev - if: ${{ github.event_name == 'push' && matrix.os == 'macos-11.0' && github.repository == 'brainflow-dev/brainflow' }} + if: ${{ github.event_name == 'push' && matrix.os == 'macos-12' && github.repository == 'brainflow-dev/brainflow' }} run: | aws s3 cp $GITHUB_WORKSPACE/installed/lib/ s3://brainflow/$GITHUB_SHA/macos_release --recursive env: diff --git a/.github/workflows/test_release.yml b/.github/workflows/test_release.yml index e4f0f7568..a0bfece6c 100644 --- a/.github/workflows/test_release.yml +++ b/.github/workflows/test_release.yml @@ -16,7 +16,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - os: [windows-2019] + os: [windows-2022] steps: # install dependencies @@ -47,7 +47,7 @@ jobs: fail-fast: false max-parallel: 4 matrix: - os: [ubuntu-18.04, ubuntu-20.04, macos-10.15, macos-11.0] + os: [ubuntu-20.04, macos-12] steps: # install dependencies @@ -58,7 +58,7 @@ jobs: with: version: 1.3.1 - name: Install Python Dependencies - if: (matrix.os == 'ubuntu-18.04') || (matrix.os == 'ubuntu-20.04') + if: (matrix.os == 'ubuntu-20.04') run: | sudo -H apt-get update -y sudo -H apt-get install -y python3-setuptools python3-pygments diff --git a/CMakeLists.txt b/CMakeLists.txt index 233bdf7b0..52ed022a7 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -35,7 +35,7 @@ if (WARNINGS_AS_ERRORS) add_compile_options (/bigobj) endif (CMAKE_BUILD_TYPE EQUAL "DEBUG") else () - add_compile_options (-Werror -Wno-varargs) + add_compile_options (-Werror -Wno-varargs -Wno-error=deprecated-declarations) endif () endif (WARNINGS_AS_ERRORS)