mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-10 02:19:14 +00:00
92 lines
3.3 KiB
YAML
92 lines
3.3 KiB
YAML
#
|
|
# Copyright (c) 2017 Angelo Zerr and other contributors as
|
|
# indicated by the @author tags.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
#
|
|
|
|
name: Early Access
|
|
|
|
# trigger on push to branches and PR
|
|
on:
|
|
push:
|
|
branch:
|
|
pull_request:
|
|
|
|
env:
|
|
GRAALVM_VERSION: '22.2.0'
|
|
JAVA_VERSION: '17'
|
|
|
|
jobs:
|
|
build:
|
|
name: 'Build with Graal on ${{ matrix.os }}'
|
|
if: startsWith(github.event.head_commit.message, '[release] Release ') != true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ ubuntu-18.04, macOS-10.15, windows-2019 ]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: 'Checkout'
|
|
uses: actions/checkout@v2
|
|
|
|
- name: 'Set vars'
|
|
shell: bash
|
|
run: |
|
|
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
|
|
echo "VERSION=$(./mvnw help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
|
|
|
|
- name: 'Set up Graal'
|
|
uses: graalvm/setup-graalvm@v1
|
|
with:
|
|
version: ${{ env.GRAALVM_VERSION }}
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
components: 'native-image'
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: 'Maven clean'
|
|
run: ./mvnw clean -Dmrm=false -B -ntp -e
|
|
|
|
- name: 'Patch Graal libs for only requiring glibc 2.12'
|
|
shell: bash
|
|
run: |
|
|
if [[ $OS == linux ]] && [[ $GRAALVM_HOME ]] && [[ -d "$GRAALVM_HOME/lib/static/linux-amd64/glibc" ]]; then
|
|
mkdir -p client/target/graalvm-libs-for-glibc-2.12
|
|
echo "memcpy memcpy@GLIBC_2.2.5" >client/target/glibc.redef
|
|
echo "posix_spawn posix_spawn@GLIBC_2.2.5" >>client/target/glibc.redef
|
|
find "$GRAALVM_HOME/lib/static/linux-amd64/glibc" -name '*.a' | while IFS= read -r input; do
|
|
output="client/target/graalvm-libs-for-glibc-2.12/$(basename -- "$input")"
|
|
objcopy --redefine-syms=client/target/glibc.redef -- "$input" "$output" 2>/dev/null
|
|
done
|
|
find /usr/lib -name libz.a | xargs -r -I {} objcopy --redefine-syms=client/target/glibc.redef {} client/target/graalvm-libs-for-glibc-2.12/libz.a
|
|
fi
|
|
|
|
- name: 'Build native distribution'
|
|
run: ./mvnw verify -Pnative -Dmrm=false -B -ntp -e
|
|
|
|
- name: 'Upload daemon test logs'
|
|
if: always()
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: daemon-test-logs-${{ env.OS }}
|
|
path: integration-tests/target/mvnd-tests/**/daemon*.log
|
|
|
|
- name: 'Upload artifact'
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: mvnd-${{ env.OS }}
|
|
path: dist/target/maven-mvnd-*.zip
|