Skip to content

Commit

Permalink
Revert "TEMP Remove other workflows since it is getting a bit confusing"
Browse files Browse the repository at this point in the history
This reverts commit e3022ad.
  • Loading branch information
kabir committed Oct 28, 2024
1 parent f01de9f commit 84d78b9
Show file tree
Hide file tree
Showing 8 changed files with 794 additions and 0 deletions.
78 changes: 78 additions & 0 deletions .github/workflows/build-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Manual Build and Test

on:
workflow_dispatch:
inputs:
os:
description: 'OS'
required: false
default: 'ubuntu-latest'
type: choice
options:
- ubuntu-latest
- windows-latest
jdk-distribution:
description: 'JDK Distribution'
required: false
default: 'temurin'
type: choice
options:
- temurin
- semeru
- microsoft
- oracle
- zulu
- corretto
- liberica
jdk-version:
description: 'JDK Version'
required: true
type: string
args:
description: 'Arguments like -Dquickly | -DskipTests | -DallTests'
required: false
default: '-Dquickly'
type: string
timeout:
description: 'Job Timeout Minutes'
required: false
default: 120
type: number

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
build:
name: Build and Test
runs-on: ${{ inputs.os }}
timeout-minutes: ${{ fromJSON(inputs.timeout) }}
strategy:
fail-fast: false

steps:
- uses: actions/checkout@v4
- name: Set up JDK ${{ inputs.jdk-distribution }} 17 to build for JDK 11 test
if: inputs.jdk-version == 11
uses: actions/setup-java@v4
with:
distribution: ${{ inputs.jdk-distribution }}
java-version: 17
cache: 'maven'
- name: Build with Maven and JDK 17 for JDK 11 Tests
if: inputs.jdk-version == 11
run: mvn -U -B -ntp clean install ${{ inputs.args }} -DskipTests
- name: Set up JDK ${{ inputs.jdk-distribution }} ${{ inputs.jdk-version }}
uses: actions/setup-java@v4
with:
distribution: ${{ inputs.jdk-distribution }}
java-version: ${{ inputs.jdk-version }}
cache: 'maven'
- name: Test with Maven and JDK 11 with -DnoCompile
if: inputs.jdk-version == 11
run: mvn -U -B -ntp test -DnoCompile ${{ inputs.args }} -rf testsuite
- name: Build and test with Maven
if: inputs.jdk-version != 11
run: mvn -U -B -ntp clean install ${{ inputs.args }}
36 changes: 36 additions & 0 deletions .github/workflows/build-only.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: WildFly Build

on:
pull_request:
branches:
- '**'
paths:
- "**/pom.xml"

# Only run the latest job
concurrency:
group: '${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}'
cancel-in-progress: true

jobs:
quick-build:
name: WildFly Build -Dquickly
runs-on: ubuntu-latest
timeout-minutes: 60

steps:
- uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'
- name: Clear any possible SNAPSHOT dependencies in the local maven repository
run: |
LOCAL_REPO="$HOME/.m2/repository"
echo "Cleaning SNAPSHOTS from $LOCAL_REPO"
if [ -d "$LOCAL_REPO" ]; then find "$LOCAL_REPO" -name "*SNAPSHOT*" | xargs -I {} rm -rfv "{}"; fi
shell: bash
- name: Build with Maven Java 17 -Dquickly
run: mvn -U -B -Dquickly
22 changes: 22 additions & 0 deletions .github/workflows/check_logging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Check non-i18n logging

on:
pull_request:
branches:
- main
- '*.x'

jobs:
check-logging:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run logging check
env:
GITHUB_BASE_REF: '${{ github.base_ref }}'
shell: bash
run: bash check_logging.sh
192 changes: 192 additions & 0 deletions .github/workflows/dep-diff-pull_request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,192 @@
name: Dependency Tree Input Builder
# To deal with https://securitylab.github.com/research/github-actions-preventing-pwn-requests
# we need to split this across two jobs. The part that writes to the pull request lives in
# ./dep-diff-workflow_run.yml
on:
pull_request:
branches:
- main
paths:
- "**/pom.xml"
env:
# The modules to check for dependencies. If there is more than one they are comma separated
MODULES_TO_CHECK: ee-feature-pack/galleon-shared,ee-feature-pack/galleon-local,galleon-pack/galleon-shared,galleon-pack/galleon-local,galleon-pack,ee-feature-pack/common,microprofile/galleon-common,servlet-feature-pack/common,elytron-oidc-client/galleon-common
ADDITIONAL_BUILD_MODULES: boms/common-ee,boms/common-expansion,boms/standard-ee,boms/standard-expansion,boms/standard-test
jobs:
check:
runs-on: ubuntu-latest
env:
ARTIFACTS: .pr_artifacts
steps:
- name: Prepare
id: prepare
run: |
# Make ARTIFACTS absolute
ARTIFACTS="${GITHUB_WORKSPACE}/${ARTIFACTS}"
echo "ARTIFACTS=${ARTIFACTS}" >> $GITHUB_ENV
mkdir ${ARTIFACTS}
echo ${{ github.event.number }} > "${ARTIFACTS}/pr"
echo "base=${GITHUB_BASE_REF}" >> $GITHUB_OUTPUT
echo "artifacts=${ARTIFACTS}" >> $GITHUB_OUTPUT
- name: Clone base version
uses: actions/checkout@v4
with:
ref: ${{ steps.prepare.outputs.base }}
path: base

- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17

# Run the caching against the base version only
- name: Cache local Maven repository
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Clone PR version
uses: actions/checkout@v4
with:
path: pr

- name: Find valid base modules to check
working-directory: base
run: |
i=0
validBaseModules=""
for module in $(echo "${MODULES_TO_CHECK}" | sed "s/,/ /g")
do
if [ -d ${module} ]; then
if [ $i -gt 0 ]; then
validBaseModules="${validBaseModules},${module}"
else
validBaseModules="${module}"
fi
i=$((i + 1))
fi
done
echo "validBaseModules="$validBaseModules
echo "validBaseModules=${validBaseModules}" >> $GITHUB_ENV
- name: Find valid base additional modules
working-directory: base
run: |
i=0
validAddlBaseModules=""
for module in $(echo "${ADDITIONAL_BUILD_MODULES}" | sed "s/,/ /g")
do
if [ -d ${module} ]; then
if [ $i -gt 0 ]; then
validAddlBaseModules="${validAddlBaseModules},${module}"
else
validAddlBaseModules="${module}"
fi
i=$((i + 1))
fi
done
echo "validAddlBaseModules="validAddlBaseModules
echo "validAddlBaseModules=${validAddlBaseModules}" >> $GITHUB_ENV
- name: Find valid PR modules to check
working-directory: pr
run: |
i=0
validPRModules=""
for module in $(echo "${MODULES_TO_CHECK}" | sed "s/,/ /g")
do
if [ -d ${module} ]; then
if [ $i -gt 0 ]; then
validPRModules="${validPRModules},${module}"
else
validPRModules="${module}"
fi
i=$((i + 1))
fi
done
echo "validPRModules="$validPRModules
echo "validPRModules=${validPRModules}" >> $GITHUB_ENV
- name: Find valid pr additional modules
working-directory: pr
run: |
i=0
validAddlPRModules=""
for module in $(echo "${ADDITIONAL_BUILD_MODULES}" | sed "s/,/ /g")
do
if [ -d ${module} ]; then
if [ $i -gt 0 ]; then
validAddlPRModules="${validAddlPRModules},${module}"
else
validAddlPRModules="${module}"
fi
i=$((i + 1))
fi
done
echo "validAddlPRModules="validAddlPRModules
echo "validAddlPRModules=${validAddlPRModules}" >> $GITHUB_ENV
- name: Build base
working-directory: base
run: |
mvn -B -ntp install -DskipTests -pl ${{ env.validBaseModules }},${{ env.validAddlBaseModules }} -am
- name: Grab base dependencies
id: base-versions
working-directory: base
run: |
i=0
baseVersionFiles=""
for module in $(echo "${{ env.validBaseModules }}" | sed "s/,/ /g")
do
baseVersionFile="_base-versions-$i.txt"
mvn -B -ntp dependency:tree -pl "${module}" -DoutputFile="${ARTIFACTS}/${baseVersionFile}" || exit 1
if [ $i -gt 0 ]; then
baseVersionFiles="${baseVersionFiles},${baseVersionFile}"
else
baseVersionFiles="${baseVersionFile}"
fi
i=$((i + 1))
done
echo "${baseVersionFiles}" > ${ARTIFACTS}/baseVersions
- name: Build PR
working-directory: pr
run: |
echo "validPRModules="$validPRModules
echo "env.validPRModules="${{ env.validPRModules }}
mvn -B -ntp install -DskipTests -pl ${{ env.validPRModules }},${{ env.validAddlPRModules }} -am
- name: Grab PR Dependencies
working-directory: pr
id: new-versions
run: |
i=0
newVersionFiles=""
for module in $(echo "${{ env.validPRModules }}" | sed "s/,/ /g")
do
newVersionFile="_new-versions-$i.txt"
mvn -B -ntp dependency:tree -pl "${module}" -DoutputFile="${ARTIFACTS}/${newVersionFile}" || exit 1
if [ $i -gt 0 ]; then
newVersionFiles="${newVersionFiles},${newVersionFile}"
else
newVersionFiles="${newVersionFile}"
fi
i=$((i + 1))
done
echo "${newVersionFiles}" > ${ARTIFACTS}/newVersions
- uses: actions/upload-artifact@v4
with:
name: input-artifacts
path: ${{ steps.prepare.outputs.artifacts }}
include-hidden-files: true
Loading

0 comments on commit 84d78b9

Please sign in to comment.