From 419bd30713945e2459e7b16bee2b8a02609b31a4 Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Thu, 27 Feb 2025 21:56:58 +0100 Subject: [PATCH] [github] WIP: Add sinttest-openfire workflow --- .github/actions/action.yml | 53 +++++++++++++++++++++++++ .github/workflows/sinttest-openfire.yml | 38 ++++++++++++++++++ 2 files changed, 91 insertions(+) create mode 100644 .github/actions/action.yml create mode 100644 .github/workflows/sinttest-openfire.yml diff --git a/.github/actions/action.yml b/.github/actions/action.yml new file mode 100644 index 0000000000..1c99da9f63 --- /dev/null +++ b/.github/actions/action.yml @@ -0,0 +1,53 @@ +name: CI Setup +description: 'Sets up the environment for jobs during CI workflow' + +inputs: + java-major-version: + required: true + +runs: + using: composite + steps: + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up JDK ${{ inputs.java-major-version }} + uses: actions/setup-java@v3 + with: + java-version: ${{ inputs.java-major-version }} + distribution: temurin + + # Caches + - name: Cache Maven + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: maven-${{ hashFiles('**/build.gradle') }} + restore-keys: | + maven- + - name: Cache Gradle + uses: actions/cache@v2 + with: + path: ~/.gradle/caches + key: gradle-caches-${{ hashFiles('**/build.gradle') }} + restore-keys: + gradle-caches + - name: Cache Android SDK + uses: actions/cache@v2 + with: + path: | + ~/.android/sdk + key: android-${{ hashFiles('build.gradle') }} + restore-keys: | + android- + + # Pre-reqs + - name: Install GraphViz + run: sudo apt update && sudo apt install graphviz + - name: Install Android SDK Manager + uses: android-actions/setup-android@v3 + - name: Install Android SDK + run: | + sdkmanager "platforms;android-26" + diff --git a/.github/workflows/sinttest-openfire.yml b/.github/workflows/sinttest-openfire.yml new file mode 100644 index 0000000000..bdbc347e11 --- /dev/null +++ b/.github/workflows/sinttest-openfire.yml @@ -0,0 +1,38 @@ +name: CI + +on: + push: + pull_request: + merge_group: + +jobs: + build: + name: Run Smack's integration tests against openfire + + runs-on: ubuntu-24.04 + services: + docker: + image: docker:dind + options: --privileged --shm-size=2g + volumes: + - /var/run/docker.sock:/var/run/docker.sock:ro + strategy: + matrix: + java: + - 17 + - 21 + env: + PRIMARY_JAVA_VERSION: 21 + + steps: + - name: CI Setup + uses: './.github/actions/ci-setup' + with: + java-major-version: ${{ matrix.java }} + + - name: Set up Docker + uses: docker/setup-docker-action@v4 + + - name: + run: | + docker run ghcr.io/igniterealtime/openfire:main