From 402334dba72fbc4a93f3387f1ae311d4610b13a3 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 5 Oct 2023 11:50:59 -0500 Subject: [PATCH 1/4] Get core dumps when CI fails Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 34 +++++++++++++++++++++------------- 1 file changed, 21 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dbc420bd19..83e386248a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,26 +7,34 @@ on: - 'ign-gazebo6' jobs: - bionic-ci: - runs-on: ubuntu-latest - name: Ubuntu Bionic CI - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Compile and test - id: ci - uses: ignition-tooling/action-ignition-ci@bionic - with: - codecov-enabled: true focal-ci: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 name: Ubuntu Focal CI steps: - name: Checkout uses: actions/checkout@v3 + - name: Download build script + run: | + curl -o build.sh https://raw.githubusercontent.com/gazebo-tooling/action-gz-ci/focal/entrypoint.sh + chmod +x build.sh + - name: Set cores to get stored in /cores + run: | + sudo mkdir /cores + sudo chmod 777 /cores + # Core filenames will be of the form executable.pid.timestamp: + sudo bash -c 'echo "/cores/%e.%p.%t" > /proc/sys/kernel/core_pattern' - name: Compile and test id: ci - uses: ignition-tooling/action-ignition-ci@focal + run: | + # Allow core dumps + ulimit -c unlimited + ./build.sh "" 1 + - uses: actions/upload-artifact@v3 + if: ${{ failure() }} # Run only if something went wrong + with: + name: cores + path: /cores + jammy-ci: runs-on: ubuntu-latest name: Ubuntu Jammy CI From 84d072d8e3f0b5f9080c4f8363f0e1023d0aad0f Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 5 Oct 2023 11:54:46 -0500 Subject: [PATCH 2/4] Run script as sudo Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 83e386248a..a4ed151096 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,8 @@ jobs: run: | # Allow core dumps ulimit -c unlimited - ./build.sh "" 1 + sudo ./build.sh "" 1 + sudo chmod -R 777 /cores - uses: actions/upload-artifact@v3 if: ${{ failure() }} # Run only if something went wrong with: From 5aa0c59156e28a7f8c6f9195359af8cf6e2ae364 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 5 Oct 2023 11:57:42 -0500 Subject: [PATCH 3/4] Preserve environment variables Signed-off-by: Addisu Z. Taddese --- .github/workflows/ci.yml | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a4ed151096..8e1b709534 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,23 +28,10 @@ jobs: run: | # Allow core dumps ulimit -c unlimited - sudo ./build.sh "" 1 + sudo -E ./build.sh "" 1 sudo chmod -R 777 /cores - uses: actions/upload-artifact@v3 if: ${{ failure() }} # Run only if something went wrong with: name: cores path: /cores - - jammy-ci: - runs-on: ubuntu-latest - name: Ubuntu Jammy CI - steps: - - name: Checkout - uses: actions/checkout@v3 - - name: Compile and test - id: ci - uses: ignition-tooling/action-ignition-ci@jammy - with: - # per bug https://github.com/ignitionrobotics/ign-gazebo/issues/1409 - cmake-args: '-DBUILD_DOCS=OFF' From 14781f279dcd89b27d8a14064ab23d2002340848 Mon Sep 17 00:00:00 2001 From: "Addisu Z. Taddese" Date: Thu, 5 Oct 2023 14:26:00 -0500 Subject: [PATCH 4/4] Fix codecov argument --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e1b709534..2274efbd9a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -28,7 +28,7 @@ jobs: run: | # Allow core dumps ulimit -c unlimited - sudo -E ./build.sh "" 1 + sudo -E ./build.sh "" true sudo chmod -R 777 /cores - uses: actions/upload-artifact@v3 if: ${{ failure() }} # Run only if something went wrong