-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge: add ssh debugging for Github Actions CI.
This PR adds ssh debugging capability to the github actions builds. This is done by creating a ssh connection to the machine with the (debugging with tmate action)[https://github.com/marketplace/actions/debugging-with-tmate]. This can be really helpful to debug Windows and OSX builds for us when we dont have access to Windows/OSX machines. Related PR: #749
- Loading branch information
Showing
6 changed files
with
217 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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,20 +22,28 @@ 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/[email protected] | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | ||
|
||
- name: configure | ||
run: | | ||
mkdir build | ||
cd build | ||
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 | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
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/[email protected] | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | ||
with: | ||
limit-access-to-actor: true | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
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/[email protected] | ||
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 | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
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/[email protected] | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | ||
with: | ||
limit-access-to-actor: true | ||
|
||
- 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
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/[email protected] | ||
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled }} | ||
with: | ||
limit-access-to-actor: true | ||
|
||
- 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 }} |