From 88e393ec600be2ccaee47cb6bc82f0720a953357 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Mon, 17 Aug 2020 02:57:33 -0400 Subject: [PATCH 1/4] CI for special cases --- .github/workflows/build-special.yml | 153 ++++++++++++++++++++++++++++ 1 file changed, 153 insertions(+) create mode 100644 .github/workflows/build-special.yml diff --git a/.github/workflows/build-special.yml b/.github/workflows/build-special.yml new file mode 100644 index 000000000..e5fc87fe3 --- /dev/null +++ b/.github/workflows/build-special.yml @@ -0,0 +1,153 @@ +name: Special Cases CI + +on: [pull_request] + +jobs: + build: + name: ${{ matrix.name }} ${{ matrix.build_type }} + runs-on: ${{ matrix.os }} + + env: + CTEST_OUTPUT_ON_FAILURE: ON + CTEST_PARALLEL_LEVEL: 2 + CMAKE_BUILD_TYPE: ${{ matrix.build_type }} + GTSAM_BUILD_UNSTABLE: ON + + strategy: + fail-fast: false + + matrix: + # Github Actions requires a single row to be added to the build matrix. + # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. + name: [ + ubuntu-gcc-deprecated, + ubuntu-gcc-quaternions, + ubuntu-gcc-points-vector, + macos-xcode-deprecated, + macos-xcode-quaternions, + macos-xcode-points-vector, + ubuntu-clang-deprecated, + ubuntu-clang-quaternions, + ubuntu-clang-points-vector + ] + + build_type: [Debug, Release] + + include: + - name: ubuntu-gcc-deprecated + os: ubuntu-18.04 + compiler: gcc + version: "9" + flag: deprecated + + - name: ubuntu-gcc-quaternions + os: ubuntu-18.04 + compiler: gcc + version: "9" + flag: quaternions + + - name: ubuntu-gcc-points-vector + os: ubuntu-18.04 + compiler: gcc + version: "9" + flag: points-vector + + - name: macos-xcode-deprecated + os: macOS-10.15 + compiler: xcode + version: "11.3.1" + flag: deprecated + + - name: macos-xcode-quaternions + os: macOS-10.15 + compiler: xcode + version: "11.3.1" + flag: quaternions + + - name: macos-xcode-points-vector + os: macOS-10.15 + compiler: xcode + version: "11.3.1" + flag: points-vector + + - name: ubuntu-clang-deprecated + os: ubuntu-18.04 + compiler: clang + version: "9" + flag: deprecated + + - name: ubuntu-clang-quaternions + os: ubuntu-18.04 + compiler: clang + version: "9" + flag: quaternions + + - name: ubuntu-clang-points-vector + os: ubuntu-18.04 + compiler: clang + version: "9" + flag: points-vector + + steps: + - name: Checkout + uses: actions/checkout@master + + - name: Install (Linux) + if: runner.os == 'Linux' + run: | + # LLVM 9 is not in Bionic's repositories so we add the official LLVM repository. + if [ "${{ matrix.compiler }}" = "clang" ] && [ "${{ matrix.version }}" = "9" ]; then + sudo add-apt-repository "deb http://apt.llvm.org/bionic/ llvm-toolchain-bionic-9 main" + fi + sudo apt-get -y update + + sudo apt install cmake build-essential pkg-config libpython-dev python-numpy + + echo "::set-env name=BOOST_ROOT::$(echo $BOOST_ROOT_1_69_0)" + echo "::set-env name=LD_LIBRARY_PATH::$(echo $BOOST_ROOT_1_69_0/lib)" + + if [ "${{ matrix.compiler }}" = "gcc" ]; then + sudo apt-get install -y g++-${{ matrix.version }} g++-${{ matrix.version }}-multilib + echo "::set-env name=CC::gcc-${{ matrix.version }}" + echo "::set-env name=CXX::g++-${{ matrix.version }}" + else + sudo apt-get install -y clang-${{ matrix.version }} g++-multilib + echo "::set-env name=CC::clang-${{ matrix.version }}" + echo "::set-env name=CXX::clang++-${{ matrix.version }}" + fi + + - name: Install (macOS) + if: runner.os == 'macOS' + run: | + brew install cmake ninja boost + if [ "${{ matrix.compiler }}" = "gcc" ]; then + brew install gcc@${{ matrix.version }} + echo "::set-env name=CC::gcc-${{ matrix.version }}" + echo "::set-env name=CXX::g++-${{ matrix.version }}" + else + sudo xcode-select -switch /Applications/Xcode_${{ matrix.version }}.app + echo "::set-env name=CC::clang" + echo "::set-env name=CXX::clang++" + fi + + - name: Set Allow Deprecated Flag + if: matrix.flag == 'deprecated' + env: + GTSAM_ALLOW_DEPRECATED_SINCE_V41: ON + run: echo "Allow deprecated since version 4.1" + + - name: Set Use Quaternions Flag + if: matrix.flag == 'quaternions' + env: + GTSAM_USE_QUATERNIONS: ON + run: echo "Use Quaternions for rotations" + + - name: Set Typedef Points to Vector Flag + if: matrix.flag == 'points-vector' + env: + GTSAM_TYPEDEF_POINTS_TO_VECTOR: ON + run: echo "Typedef Points to Vector" + + - name: Build & Test + run: | + bash .github/scripts/unix.sh -t From 21988f399ed926c9e45d2d8728bb8cbb5b18dadf Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 19 Aug 2020 11:49:27 -0400 Subject: [PATCH 2/4] reduce special cases to only Ubuntu+GCC, disable Python CI for Ubuntu GCC9 --- .github/workflows/build-python.yml | 2 +- .github/workflows/build-special.yml | 45 ++--------------------------- 2 files changed, 3 insertions(+), 44 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index 0b4a7f12f..b46224086 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -20,7 +20,7 @@ jobs: # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. name: [ ubuntu-18.04-gcc-5, - ubuntu-18.04-gcc-9, + # ubuntu-18.04-gcc-9, # TODO Disabled for now because of timeouts ubuntu-18.04-clang-9, macOS-10.15-xcode-11.3.1, ] diff --git a/.github/workflows/build-special.yml b/.github/workflows/build-special.yml index e5fc87fe3..21984311b 100644 --- a/.github/workflows/build-special.yml +++ b/.github/workflows/build-special.yml @@ -19,16 +19,11 @@ jobs: matrix: # Github Actions requires a single row to be added to the build matrix. # See https://help.github.com/en/articles/workflow-syntax-for-github-actions. - name: [ + name: + [ ubuntu-gcc-deprecated, ubuntu-gcc-quaternions, ubuntu-gcc-points-vector, - macos-xcode-deprecated, - macos-xcode-quaternions, - macos-xcode-points-vector, - ubuntu-clang-deprecated, - ubuntu-clang-quaternions, - ubuntu-clang-points-vector ] build_type: [Debug, Release] @@ -52,42 +47,6 @@ jobs: version: "9" flag: points-vector - - name: macos-xcode-deprecated - os: macOS-10.15 - compiler: xcode - version: "11.3.1" - flag: deprecated - - - name: macos-xcode-quaternions - os: macOS-10.15 - compiler: xcode - version: "11.3.1" - flag: quaternions - - - name: macos-xcode-points-vector - os: macOS-10.15 - compiler: xcode - version: "11.3.1" - flag: points-vector - - - name: ubuntu-clang-deprecated - os: ubuntu-18.04 - compiler: clang - version: "9" - flag: deprecated - - - name: ubuntu-clang-quaternions - os: ubuntu-18.04 - compiler: clang - version: "9" - flag: quaternions - - - name: ubuntu-clang-points-vector - os: ubuntu-18.04 - compiler: clang - version: "9" - flag: points-vector - steps: - name: Checkout uses: actions/checkout@master From 7c44d9ee66548e877f611616349e4fef45cd4111 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 19 Aug 2020 13:54:16 -0400 Subject: [PATCH 3/4] updated step name --- .github/workflows/build-linux.yml | 2 +- .github/workflows/build-macos.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 911bec59c..afe328c3b 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -72,7 +72,7 @@ jobs: if: runner.os == 'Linux' run: | echo "BOOST_ROOT = $BOOST_ROOT" - - name: Build (Linux) + - name: Build and Test (Linux) if: runner.os == 'Linux' run: | bash .github/scripts/unix.sh -t \ No newline at end of file diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index 55d9071ef..363cd690f 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -45,7 +45,7 @@ jobs: echo "::set-env name=CC::clang" echo "::set-env name=CXX::clang++" fi - - name: Build (macOS) + - name: Build and Test (macOS) if: runner.os == 'macOS' run: | bash .github/scripts/unix.sh -t \ No newline at end of file From 90cf8d74ddcdf4c5583490e398e0623af3414221 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Wed, 19 Aug 2020 13:59:59 -0400 Subject: [PATCH 4/4] comment out python ubuntu-gcc-9 completely --- .github/workflows/build-python.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-python.yml b/.github/workflows/build-python.yml index b46224086..b85ffbdfe 100644 --- a/.github/workflows/build-python.yml +++ b/.github/workflows/build-python.yml @@ -34,10 +34,11 @@ jobs: compiler: gcc version: "5" - - name: ubuntu-18.04-gcc-9 - os: ubuntu-18.04 - compiler: gcc - version: "9" + # TODO Disabled for now because of timeouts + # - name: ubuntu-18.04-gcc-9 + # os: ubuntu-18.04 + # compiler: gcc + # version: "9" - name: ubuntu-18.04-clang-9 os: ubuntu-18.04