From 4aee152c97f74db9d583cbca40b6205388e2e7af Mon Sep 17 00:00:00 2001 From: Pratik Nayak Date: Wed, 21 Apr 2021 11:35:00 +0200 Subject: [PATCH 1/4] Add Debug CI setup to OSX-build. --- .github/workflows/osx.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/osx.yml b/.github/workflows/osx.yml index de5c9d36c7d..6827c5fe476 100644 --- a/.github/workflows/osx.yml +++ b/.github/workflows/osx.yml @@ -1,6 +1,13 @@ name: OSX-build -on: [push] +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false jobs: osx-clang-omp: @@ -15,13 +22,20 @@ jobs: steps: - uses: actions/checkout@v2 + - name: setup run: | brew install libomp + - name: info run: | g++ -v cmake --version + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + - name: configure run: | mkdir build @@ -29,6 +43,7 @@ jobs: cmake .. -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} make -j8 ctest -j10 --output-on-failure + - name: install run: | cd build From e1a8b141aa7596a69b326b681ea26dd1d921ee17 Mon Sep 17 00:00:00 2001 From: Pratik Nayak Date: Wed, 21 Apr 2021 14:10:22 +0200 Subject: [PATCH 2/4] Move Windows builds to separate files, add debug + Adds ssh debugging capability with tmate for Windows builds. --- .github/workflows/windows-build.yml | 126 ------------------------ .github/workflows/windows-cygwin.yml | 51 ++++++++++ .github/workflows/windows-mingw.yml | 49 +++++++++ .github/workflows/windows-msvc-cuda.yml | 48 +++++++++ .github/workflows/windows-msvc-ref.yml | 45 +++++++++ 5 files changed, 193 insertions(+), 126 deletions(-) delete mode 100644 .github/workflows/windows-build.yml create mode 100644 .github/workflows/windows-cygwin.yml create mode 100644 .github/workflows/windows-mingw.yml create mode 100644 .github/workflows/windows-msvc-cuda.yml create mode 100644 .github/workflows/windows-msvc-ref.yml diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml deleted file mode 100644 index 3eae206f6a9..00000000000 --- a/.github/workflows/windows-build.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Windows-build - -on: [push] - -jobs: - windows_cuda: - strategy: - fail-fast: false - matrix: - config: - - {version: "10.2.89.20191206", name: "cuda102/release/shared"} - - {version: "latest", name: "cuda-latest/release/shared"} - name: msvc/${{ matrix.config.name }} (only compile) - runs-on: [windows-latest] - steps: - - uses: actions/checkout@v2 - - name: setup (versioned) - if: matrix.config.version != 'latest' - run: | - choco install cuda --version=${{ matrix.config.version }} -y - - name: setup (latest) - if: matrix.config.version == 'latest' - run: | - choco install cuda -y - - name: configure - run: | - $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." - Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" - refreshenv - $env:PATH="$env:PATH;$pwd\build\windows_shared_library" - mkdir build - cd build - cmake -DCMAKE_CXX_FLAGS=/bigobj -DGINKGO_BUILD_CUDA=ON -DGINKGO_BUILD_OMP=OFF -DGINKGO_CUDA_ARCHITECTURES=60 .. - cmake --build . -j4 --config Release - - windows_ref: - strategy: - fail-fast: false - matrix: - config: - - {shared: "ON", build_type: "Debug", name: "reference/debug/shared"} - - {shared: "OFF", build_type: "Release", name: "reference/release/static"} - # Debug static needs too much storage - # - {shared: "OFF", build_type: "Debug", name: "reference/debug/static"} - name: msvc/${{ matrix.config.name }} - runs-on: [windows-latest] - steps: - - uses: actions/checkout@v2 - - name: configure - run: | - $env:PATH="$env:PATH;$pwd\build\windows_shared_library" - mkdir build - cd build - cmake -DCMAKE_CXX_FLAGS=/bigobj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_CXX_FLAGS_DEBUG="/MDd /Zi /Ob1 /Od /RTC1" -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_OMP=OFF .. - cmake --build . -j4 --config ${{ matrix.config.build_type }} - ctest . -C ${{ matrix.config.build_type }} --output-on-failure - - name: install - run: | - $env:PATH="$env:PATH;C:\Program Files (x86)\Ginkgo\lib" - cd build - cmake --install . --config ${{ matrix.config.build_type }} - cmake --build . --target test_install --config ${{ matrix.config.build_type }} - windows_mingw: - strategy: - fail-fast: false - matrix: - config: - - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} - name: mingw/${{ matrix.config.name }} - runs-on: [windows-latest] - steps: - - uses: actions/checkout@v2 - - name: configure - # Use cmd to remove the path easily - run: | - bcdedit /set IncreaseUserVa 3072 - editbin /LARGEADDRESSAWARE "C:\Program Files\Git\mingw64\bin\cc1plus.exe" - path %PATH:C:\Program Files\Git\bin;=% - path %PATH:C:\Program Files\Git\usr\bin;=%;%GITHUB_WORKSPACE%\build\windows_shared_library - mkdir build - cd build - cmake -G "MinGW Makefiles" -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .. - cmake --build . -j4 - ctest . --output-on-failure - shell: cmd - - name: install - run: | - set PATH=%PATH:C:\Program Files\Git\bin;=% - set PATH=%PATH:C:\Program Files\Git\usr\bin;=%;C:\Program Files (x86)\Ginkgo\lib - cd build - cmake --install . - cmake --build . --target test_install - shell: cmd - - windows_cygwin: - strategy: - fail-fast: false - matrix: - config: - - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} - name: cygwin/${{ matrix.config.name }} - runs-on: [windows-latest] - steps: - - run: git config --global core.autocrlf input - - uses: actions/checkout@v2 - - name: setup - run: | - choco install cygwin -y - choco install cyg-get -y - cyg-get cmake make gcc-g++ git - - name: configure - run: | - path C:\tools\cygwin\bin;%GITHUB_WORKSPACE%\build\windows_shared_library - mkdir build - cd build - bash -c "cmake -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .." - bash -c "make -j4" - bash -c "ctest . --output-on-failure" - shell: cmd - - name: install - run: | - path C:\tools\cygwin\bin - cd build - bash -c "make install" - bash -c "export PATH=/usr/local/lib:$PATH && make test_install" - shell: cmd diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml new file mode 100644 index 00000000000..afbb49ac9e6 --- /dev/null +++ b/.github/workflows/windows-cygwin.yml @@ -0,0 +1,51 @@ +name: Windows-CygWin + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_cygwin: + strategy: + fail-fast: false + matrix: + config: + - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} + name: cygwin/${{ matrix.config.name }} + runs-on: [windows-latest] + steps: + - run: git config --global core.autocrlf input + - uses: actions/checkout@v2 + + - name: setup + run: | + choco install cygwin -y + choco install cyg-get -y + cyg-get cmake make gcc-g++ git + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + + - name: configure + run: | + path C:\tools\cygwin\bin;%GITHUB_WORKSPACE%\build\windows_shared_library + mkdir build + cd build + bash -c "cmake -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .." + bash -c "make -j4" + bash -c "ctest . --output-on-failure" + shell: cmd + + - name: install + run: | + path C:\tools\cygwin\bin + cd build + bash -c "make install" + bash -c "export PATH=/usr/local/lib:$PATH && make test_install" + shell: cmd diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml new file mode 100644 index 00000000000..8381c41e9e8 --- /dev/null +++ b/.github/workflows/windows-mingw.yml @@ -0,0 +1,49 @@ +name: Windows-MinGW + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_mingw: + strategy: + fail-fast: false + matrix: + config: + - {shared: "OFF", build_type: "Release", name: "omp/release/static", cflags: ""} + name: mingw/${{ matrix.config.name }} + runs-on: [windows-latest] + steps: + - uses: actions/checkout@v2 + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + + - name: configure + # Use cmd to remove the path easily + run: | + bcdedit /set IncreaseUserVa 3072 + editbin /LARGEADDRESSAWARE "C:\Program Files\Git\mingw64\bin\cc1plus.exe" + path %PATH:C:\Program Files\Git\bin;=% + path %PATH:C:\Program Files\Git\usr\bin;=%;%GITHUB_WORKSPACE%\build\windows_shared_library + mkdir build + cd build + cmake -G "MinGW Makefiles" -DCMAKE_CXX_FLAGS=-Wa,-mbig-obj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_BUILD_TYPE=${{ matrix.config.build_type }} -DGINKGO_COMPILER_FLAGS=${{ matrix.config.cflags }} .. + cmake --build . -j4 + ctest . --output-on-failure + shell: cmd + + - name: install + run: | + set PATH=%PATH:C:\Program Files\Git\bin;=% + set PATH=%PATH:C:\Program Files\Git\usr\bin;=%;C:\Program Files (x86)\Ginkgo\lib + cd build + cmake --install . + cmake --build . --target test_install + shell: cmd diff --git a/.github/workflows/windows-msvc-cuda.yml b/.github/workflows/windows-msvc-cuda.yml new file mode 100644 index 00000000000..e8857d4e8e3 --- /dev/null +++ b/.github/workflows/windows-msvc-cuda.yml @@ -0,0 +1,48 @@ +name: Windows-MSVC-CUDA (compile-only) + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_cuda: + strategy: + fail-fast: false + matrix: + config: + - {version: "10.2.89.20191206", name: "cuda102/release/shared"} + - {version: "latest", name: "cuda-latest/release/shared"} + name: msvc/${{ matrix.config.name }} (only compile) + runs-on: [windows-latest] + + steps: + - uses: actions/checkout@v2 + - name: setup (versioned) + if: matrix.config.version != 'latest' + run: | + choco install cuda --version=${{ matrix.config.version }} -y + + - name: setup (latest) + if: matrix.config.version == 'latest' + run: | + choco install cuda -y + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + + - name: configure + run: | + $env:ChocolateyInstall = Convert-Path "$((Get-Command choco).Path)\..\.." + Import-Module "$env:ChocolateyInstall\helpers\chocolateyProfile.psm1" + refreshenv + $env:PATH="$env:PATH;$pwd\build\windows_shared_library" + mkdir build + cd build + cmake -DCMAKE_CXX_FLAGS=/bigobj -DGINKGO_BUILD_CUDA=ON -DGINKGO_BUILD_OMP=OFF -DGINKGO_CUDA_ARCHITECTURES=60 .. + cmake --build . -j4 --config Release diff --git a/.github/workflows/windows-msvc-ref.yml b/.github/workflows/windows-msvc-ref.yml new file mode 100644 index 00000000000..be6fd58e55c --- /dev/null +++ b/.github/workflows/windows-msvc-ref.yml @@ -0,0 +1,45 @@ +name: Windows-MSVC-Reference + +on: + push: + workflow_dispatch: + inputs: + debug_enabled: + description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)' + required: false + default: false + +jobs: + windows_ref: + strategy: + fail-fast: false + matrix: + config: + - {shared: "ON", build_type: "Debug", name: "reference/debug/shared"} + - {shared: "OFF", build_type: "Release", name: "reference/release/static"} + # Debug static needs too much storage + # - {shared: "OFF", build_type: "Debug", name: "reference/debug/static"} + name: msvc/${{ matrix.config.name }} + runs-on: [windows-latest] + steps: + - uses: actions/checkout@v2 + + - name: Debug over SSH (tmate) + uses: mxschmitt/action-tmate@v3.5 + if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + + - name: configure + run: | + $env:PATH="$env:PATH;$pwd\build\windows_shared_library" + mkdir build + cd build + cmake -DCMAKE_CXX_FLAGS=/bigobj -DBUILD_SHARED_LIBS=${{ matrix.config.shared }} -DCMAKE_CXX_FLAGS_DEBUG="/MDd /Zi /Ob1 /Od /RTC1" -DGINKGO_BUILD_CUDA=OFF -DGINKGO_BUILD_OMP=OFF .. + cmake --build . -j4 --config ${{ matrix.config.build_type }} + ctest . -C ${{ matrix.config.build_type }} --output-on-failure + + - name: install + run: | + $env:PATH="$env:PATH;C:\Program Files (x86)\Ginkgo\lib" + cd build + cmake --install . --config ${{ matrix.config.build_type }} + cmake --build . --target test_install --config ${{ matrix.config.build_type }} From 6dc25373005d72df8423d457b3c5ec8ad7e01b0a Mon Sep 17 00:00:00 2001 From: Pratik Nayak Date: Thu, 22 Apr 2021 09:40:04 +0200 Subject: [PATCH 3/4] Fix typo Co-authored-by: Yuhsiang M. Tsai <19565938+yhmtsai@users.noreply.github.com> --- .github/workflows/windows-cygwin.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml index afbb49ac9e6..bd03328ac53 100644 --- a/.github/workflows/windows-cygwin.yml +++ b/.github/workflows/windows-cygwin.yml @@ -1,4 +1,4 @@ -name: Windows-CygWin +name: Windows-Cygwin on: push: From f0615c74bad6cff1031395c9d259b2895eb61aba Mon Sep 17 00:00:00 2001 From: Pratik Nayak Date: Thu, 22 Apr 2021 13:25:41 +0200 Subject: [PATCH 4/4] Restrict windows ssh-debugging to collaborators --- .github/workflows/windows-cygwin.yml | 2 ++ .github/workflows/windows-mingw.yml | 2 ++ .github/workflows/windows-msvc-cuda.yml | 2 ++ .github/workflows/windows-msvc-ref.yml | 2 ++ 4 files changed, 8 insertions(+) diff --git a/.github/workflows/windows-cygwin.yml b/.github/workflows/windows-cygwin.yml index bd03328ac53..dbbba5f1e1c 100644 --- a/.github/workflows/windows-cygwin.yml +++ b/.github/workflows/windows-cygwin.yml @@ -31,6 +31,8 @@ jobs: - name: Debug over SSH (tmate) uses: mxschmitt/action-tmate@v3.5 if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - name: configure run: | diff --git a/.github/workflows/windows-mingw.yml b/.github/workflows/windows-mingw.yml index 8381c41e9e8..7cfa250757b 100644 --- a/.github/workflows/windows-mingw.yml +++ b/.github/workflows/windows-mingw.yml @@ -24,6 +24,8 @@ jobs: - name: Debug over SSH (tmate) uses: mxschmitt/action-tmate@v3.5 if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - name: configure # Use cmd to remove the path easily diff --git a/.github/workflows/windows-msvc-cuda.yml b/.github/workflows/windows-msvc-cuda.yml index e8857d4e8e3..bc4557e96bf 100644 --- a/.github/workflows/windows-msvc-cuda.yml +++ b/.github/workflows/windows-msvc-cuda.yml @@ -35,6 +35,8 @@ jobs: - name: Debug over SSH (tmate) uses: mxschmitt/action-tmate@v3.5 if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - name: configure run: | diff --git a/.github/workflows/windows-msvc-ref.yml b/.github/workflows/windows-msvc-ref.yml index be6fd58e55c..13a29f6cc51 100644 --- a/.github/workflows/windows-msvc-ref.yml +++ b/.github/workflows/windows-msvc-ref.yml @@ -27,6 +27,8 @@ jobs: - name: Debug over SSH (tmate) uses: mxschmitt/action-tmate@v3.5 if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} + with: + limit-access-to-actor: true - name: configure run: |