mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-31 16:20:45 +00:00
3.9.16 is the newest release on the Maven 3.9.x line (which Tycho 4.0.x requires) and is the version the GitHub runner image shipped as default before image 20261004.327.1 bumped the default to the Tycho-incompatible 3.10.0. Pinning the image's former default avoids a per-run download. Assisted-By: Claude Opus 4.8
103 lines
4.2 KiB
YAML
103 lines
4.2 KiB
YAML
name: build-aws-sdk-p2
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- 'java/com.amazon.aws.aws-java-api/**'
|
|
- 'java/com.amazon.aws.aws-java-api.updatesite/**'
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
build-aws-sdk-p2:
|
|
permissions:
|
|
contents: write
|
|
checks: write
|
|
actions: read
|
|
runs-on: 'ubuntu-latest'
|
|
steps:
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@v1.3.1
|
|
with:
|
|
# this might remove tools that are actually needed,
|
|
# if set to "true" but frees about 6 GB
|
|
tool-cache: false
|
|
# all of these default to true, but feel free to set to
|
|
# "false" if necessary for your workflow
|
|
android: false
|
|
dotnet: true
|
|
haskell: true
|
|
large-packages: true
|
|
docker-images: false
|
|
swap-storage: true
|
|
- name: Collect Workflow Telemetry
|
|
uses: catchpoint/workflow-telemetry-action@94c3c3d9567a0205de6da68a76c428ce4e769af1 # v2.0.0
|
|
with:
|
|
comment_on_pr: false
|
|
- name: Check out the repository to the runner
|
|
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
|
with:
|
|
fetch-depth: '500'
|
|
- name: Install JDK 8
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
|
java-version: '8'
|
|
mvn-toolchain-id: 'JavaSE-1.8'
|
|
- name: Install JDK 17
|
|
uses: actions/setup-java@v4
|
|
with:
|
|
distribution: 'temurin' # See 'Supported distributions' for available options
|
|
java-version: '17'
|
|
mvn-toolchain-id: 'JavaSE-17'
|
|
- name: Pin Apache Maven to 3.9.16
|
|
# Tycho 4.0.x requires the Maven 3.9.x line; the GitHub runner image's default
|
|
# Maven floats and bumped to 3.10.0, which breaks Tycho's Sisu/Guice component
|
|
# wiring. Pin a known-good 3.9.x so the build no longer depends on the runner
|
|
# image's default.
|
|
uses: stCarolas/setup-maven@12eb41b233df95d49b0c11fc1b5bc8312e5d4ce0 # v5.1
|
|
with:
|
|
maven-version: 3.9.16
|
|
- shell: bash
|
|
env: # Or as an environment variable
|
|
TMP: /mnt/tmp
|
|
JAVA8_HOME: ${{env.JAVA_HOME_8_X64}}
|
|
JAVA17_HOME: ${{env.JAVA_HOME_17_X64}}
|
|
run: |
|
|
./java/com.amazon.aws.aws-java-api/createLocalAwsApiP2Repository.sh 2>&1 | tee build.log
|
|
echo "VERSION=$( cat java/com.amazon.aws.aws-java-api/build.gradle | grep "implementation platform('software.amazon.awssdk:bom:[0-9.]*')" | sed -e 's/^\s*implementation platform('\''software\.amazon\.awssdk:bom:\([0-9.]*\)'\'')/\1/' )" >>${GITHUB_ENV}
|
|
- name: Upload build log
|
|
uses: actions/upload-artifact@v4
|
|
if: always()
|
|
with:
|
|
name: build.log
|
|
path: build.log
|
|
retention-days: 90
|
|
- name: Upload p2 site as artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: aws-sdk-p2
|
|
path: java/com.amazon.aws.aws-java-api.updatesite/target/repository/**/*
|
|
retention-days: 90
|
|
- name: SCP artifacts to download.eclipse.org to version-specific folder
|
|
uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1
|
|
with:
|
|
host: projects-storage.eclipse.org
|
|
username: ${{ secrets.SCP_USERNAME }}
|
|
key: ${{ secrets.SCP_KEY }}
|
|
passphrase: ${{ secrets.SCP_PASSPHRASE }}
|
|
source: "java/com.amazon.aws.aws-java-api.updatesite/target/repository"
|
|
target: "/home/data/httpd/download.eclipse.org/sailing-analytics/p2/aws-sdk-${{env.VERSION}}"
|
|
strip_components: 4
|
|
rm: true
|
|
- name: SCP artifacts to download.eclipse.org to default folder
|
|
uses: appleboy/scp-action@ff85246acaad7bdce478db94a363cd2bf7c90345 # v1
|
|
with:
|
|
host: projects-storage.eclipse.org
|
|
username: ${{ secrets.SCP_USERNAME }}
|
|
key: ${{ secrets.SCP_KEY }}
|
|
passphrase: ${{ secrets.SCP_PASSPHRASE }}
|
|
source: "java/com.amazon.aws.aws-java-api.updatesite/target/repository"
|
|
target: "/home/data/httpd/download.eclipse.org/sailing-analytics/p2/aws-sdk"
|
|
strip_components: 4
|
|
rm: true
|