Run DSF-GDB tests when releng may have changed #1808
Workflow file for this run
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
name: Build and Test | |
on: [push, pull_request] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 90 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
# dsf filters are to know when to run dsf-gdb tests (See ref below) | |
# it includes any changes to debug, or anything likely to affect gdb | |
# testing | |
filters: | | |
dsf: | |
- 'dsf-gdb/**' | |
- 'dsf/**' | |
- 'debug/**' | |
- 'jtag/**' | |
- 'pom.xml' | |
- 'releng/**' | |
docs: | |
- 'doc/org.eclipse.cdt.doc.user/**' | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v4 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
cache: maven | |
- name: Set up Maven | |
uses: stCarolas/setup-maven@v5 | |
with: | |
maven-version: 3.9.6 | |
- name: Install GCC & GDB & other build essentials | |
run: | | |
sudo apt-get update | |
sudo apt-get -y install build-essential gcc g++ gdb gdbserver | |
gdb --version | |
gcc --version | |
gdbserver --version | |
- name: Build and Test | |
run: | | |
export DISPLAY=:99 | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & | |
echo 0| sudo tee /proc/sys/kernel/yama/ptrace_scope | |
mvn \ | |
clean verify -B -V \ | |
-Dmaven.test.failure.ignore=true \ | |
-DexcludedGroups=flakyTest,slowTest \ | |
-Ddsf.gdb.tests.timeout.multiplier=50 \ | |
-Ddsf-gdb.skip.tests=$(test ${{ steps.filter.outputs.dsf }} == 'false' && echo 'true' || echo 'false') \ | |
-Dindexer.timeout=300 | |
- name: Upload Logs | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: Detailed Logs | |
path: '**/*.log' | |
- name: Prepare Test Results for upload | |
if: (success() || failure()) | |
run: | | |
cp ${{ github.event_path }} event.json | |
- name: Upload Test Results | |
uses: actions/upload-artifact@v4 | |
if: success() || failure() | |
with: | |
name: test-results | |
path: | | |
event.json | |
*/*/target/surefire-reports/*.xml | |
terminal/plugins/org.eclipse.tm.terminal.test/target/surefire-reports/*.xml | |
- name: Prepare Docs for upload | |
if: (success() || failure()) && steps.filter.outputs.docs | |
run: | | |
mkdir -p docs/user | |
cd docs/user | |
unzip ../../releng/org.eclipse.cdt.repo/target/repository/plugins/org.eclipse.cdt.doc.user_*.jar | |
- name: Upload Docs | |
uses: actions/upload-artifact@v4 | |
if: (success() || failure()) && steps.filter.outputs.docs | |
with: | |
name: docs | |
include-hidden-files: true | |
path: | | |
docs/** |