Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port all the mvnd-1.x fixes for release to master #1027

Merged
merged 2 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 23 additions & 8 deletions .github/workflows/early-access.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
default-build:
name: 'Default build (without Graal)'
if: startsWith(github.event.head_commit.message, '[release] Release ') != true
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: 'Checkout'
uses: actions/checkout@v4
Expand All @@ -47,7 +47,7 @@ jobs:
distribution: 'temurin'

- name: 'Run default (non-native) build'
run: ./mvnw verify -Dmrm=false -V -B -ntp -e
run: ./mvnw verify -Dmrm=false -V -B -ntp -e -s .mvn/release-settings.xml

- name: 'Upload daemon test logs'
if: always()
Expand All @@ -62,7 +62,8 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
# binaries wanted: linux amd64, mac intel, mac M1, windows x86
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -72,9 +73,23 @@ jobs:
- name: 'Set vars'
shell: bash
run: |
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
if [[ $ARCH == 'x64' ]]
then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [[ $ARCH == 'arm64' ]]
then
echo "ARCH=aarch64" >> $GITHUB_ENV
else
echo "ARCH=$ARCH" >> $GITHUB_ENV
fi
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
if [[ $OS == 'macos' ]]
then
echo "OS=darwin" >> $GITHUB_ENV
else
echo "OS=$OS" >> $GITHUB_ENV
fi
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: 'Set up Graal'
Expand Down Expand Up @@ -110,7 +125,7 @@ jobs:
objcopy --redefine-syms=client/src/main/resources/glibc/glibc.redef client/target/graalvm-libs-for-glibc-2.12/Scrt1.o 2>/dev/null

- name: 'Build native distribution'
run: ./mvnw verify -Pnative -Dmrm=false -V -B -ntp -e
run: ./mvnw verify -Pnative -Dmrm=false -V -B -ntp -e -s .mvn/release-settings.xml

- name: 'Verify native binary for only requiring glibc 2.12'
if: ${{ env.OS == 'linux' }}
Expand All @@ -125,11 +140,11 @@ jobs:
if: always()
uses: actions/upload-artifact@v4
with:
name: daemon-test-logs-${{ env.OS }}
name: daemon-test-logs-${{ env.OS }}-${{ env.ARCH }}
path: integration-tests/target/mvnd-tests/**/daemon*.log

- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: mvnd-${{ env.OS }}
name: mvnd-${{ env.OS }}-${{ env.ARCH }}
path: dist/target/maven-mvnd-*.zip
89 changes: 69 additions & 20 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ jobs:
strategy:
fail-fast: true
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
# binaries wanted: linux amd64, mac intel, mac M1, windows x86
os: [ ubuntu-latest, macos-13, macos-14, windows-latest ]
runs-on: ${{ matrix.os }}

steps:
Expand All @@ -44,9 +45,23 @@ jobs:
- name: 'Set vars'
shell: bash
run: |
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
if [[ $ARCH == 'x64' ]]
then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [[ $ARCH == 'arm64' ]]
then
echo "ARCH=aarch64" >> $GITHUB_ENV
else
echo "ARCH=$ARCH" >> $GITHUB_ENV
fi
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
if [[ $OS == 'macos' ]]
then
echo "OS=darwin" >> $GITHUB_ENV
else
echo "OS=$OS" >> $GITHUB_ENV
fi
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: 'Set up Graal'
Expand Down Expand Up @@ -96,24 +111,38 @@ jobs:
- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: artifacts
name: mvnd-${{ env.OS }}-${{ env.ARCH }}
path: |
dist/target/maven-mvnd-*.zip
dist/target/maven-mvnd-*.tar.gz

source:
name: 'Build source distributions'
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
steps:
- name: 'Check out repository'
uses: actions/checkout@v4

- name: 'Set vars'
shell: bash
run: |
ARCH=$(echo '${{ runner.arch }}' | awk '{print tolower($0)}')
if [[ $ARCH == 'x64' ]]
then
echo "ARCH=amd64" >> $GITHUB_ENV
elif [[ $ARCH == 'arm64' ]]
then
echo "ARCH=aarch64" >> $GITHUB_ENV
else
echo "ARCH=$ARCH" >> $GITHUB_ENV
fi
OS=$(echo '${{ runner.os }}' | awk '{print tolower($0)}')
[[ $OS == 'ubuntu' ]] && echo "OS=linux" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
[[ $OS == 'macos' ]] && echo "OS=darwin" >> $GITHUB_ENV || echo "OS=$OS" >> $GITHUB_ENV
if [[ $OS == 'macos' ]]
then
echo "OS=darwin" >> $GITHUB_ENV
else
echo "OS=$OS" >> $GITHUB_ENV
fi
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV

- name: 'Set up Graal'
Expand All @@ -125,18 +154,18 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: 'Build source distribution'
run: ./mvnw clean verify -Psource-distribution -N -B -ntp -e
run: ./mvnw clean verify -Psource-distribution -N -B -ntp -e -s .mvn/release-settings.xml

- name: 'Upload artifact'
uses: actions/upload-artifact@v4
with:
name: artifacts
name: mvnd-sources
path: |
target/maven-mvnd-*.zip
target/maven-mvnd-*.tar.gz

release:
runs-on: ubuntu-22.04
runs-on: ubuntu-latest
needs: [build, source]

steps:
Expand All @@ -158,8 +187,8 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
key: ${{ runner.os }}-${{ runner.arch }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-${{ runner.arch }}-m2

- name: ls -R
run: ls -R
Expand All @@ -185,7 +214,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/maven-mvnd-${{ env.VERSION }}-src.zip
asset_path: mvnd-sources/maven-mvnd-${{ env.VERSION }}-src.zip
asset_name: maven-mvnd-${{ env.VERSION }}-src.zip
asset_content_type: application/zip

Expand All @@ -195,7 +224,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/maven-mvnd-${{ env.VERSION }}-src.tar.gz
asset_path: mvnd-sources/maven-mvnd-${{ env.VERSION }}-src.tar.gz
asset_name: maven-mvnd-${{ env.VERSION }}-src.tar.gz
asset_content_type: application/tar.gz

Expand All @@ -205,7 +234,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-linux-amd64.zip
asset_path: mvnd-linux-amd64/maven-mvnd-${{ env.VERSION }}-linux-amd64.zip
asset_name: maven-mvnd-${{ env.VERSION }}-linux-amd64.zip
asset_content_type: application/zip

Expand All @@ -215,7 +244,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-linux-amd64.tar.gz
asset_path: mvnd-linux-amd64/maven-mvnd-${{ env.VERSION }}-linux-amd64.tar.gz
asset_name: maven-mvnd-${{ env.VERSION }}-linux-amd64.tar.gz
asset_content_type: application/x-gzip

Expand All @@ -225,7 +254,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-darwin-amd64.zip
asset_path: mvnd-darwin-amd64/maven-mvnd-${{ env.VERSION }}-darwin-amd64.zip
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-amd64.zip
asset_content_type: application/zip

Expand All @@ -235,17 +264,37 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-darwin-amd64.tar.gz
asset_path: mvnd-darwin-amd64/maven-mvnd-${{ env.VERSION }}-darwin-amd64.tar.gz
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-amd64.tar.gz
asset_content_type: application/x-gzip

- name: Deploy maven-mvnd-darwin-aarch64.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: mvnd-darwin-aarch64/maven-mvnd-${{ env.VERSION }}-darwin-aarch64.zip
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-aarch64.zip
asset_content_type: application/zip

- name: Deploy maven-mvnd-darwin-aarch64.tar.gz
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: mvnd-darwin-aarch64/maven-mvnd-${{ env.VERSION }}-darwin-aarch64.tar.gz
asset_name: maven-mvnd-${{ env.VERSION }}-darwin-aarch64.tar.gz
asset_content_type: application/x-gzip

- name: Deploy maven-mvnd-windows-amd64.zip
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-windows-amd64.zip
asset_path: mvnd-windows-amd64/maven-mvnd-${{ env.VERSION }}-windows-amd64.zip
asset_name: maven-mvnd-${{ env.VERSION }}-windows-amd64.zip
asset_content_type: application/zip

Expand All @@ -255,7 +304,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/dist/target/maven-mvnd-${{ env.VERSION }}-windows-amd64.tar.gz
asset_path: mvnd-windows-amd64/maven-mvnd-${{ env.VERSION }}-windows-amd64.tar.gz
asset_name: maven-mvnd-${{ env.VERSION }}-windows-amd64.tar.gz
asset_content_type: application/x-gzip

Loading