mirror of
https://github.com/TheWhiteDog9487/WebAPI.git
synced 2026-08-11 23:01:30 +08:00
暂时废弃GraalVM Native Image
这东西太折磨人了,而且我本地设备还编译不了 用Github Codespace编译 -> 测试 -> 发现反射爆炸又要加规则 -> 重新编译 这一套流程跑一次半个小时没了,跑之前还无法预知到底要弄几次
This commit is contained in:
+34
-33
@@ -2,6 +2,7 @@ name: 构建
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build-jar:
|
||||
@@ -24,36 +25,36 @@ jobs:
|
||||
with:
|
||||
name: WebAPI Jar
|
||||
path: build/libs/*boot*.jar
|
||||
build-native:
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
matrix:
|
||||
os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
steps:
|
||||
- name: 签出仓库
|
||||
uses: actions/checkout@v7
|
||||
- name: 安装GraalVM
|
||||
uses: graalvm/setup-graalvm@v1
|
||||
with:
|
||||
java-version: '25'
|
||||
distribution: 'liberica'
|
||||
- name: 让gradlew可执行
|
||||
if: runner.os != 'Windows'
|
||||
run: chmod +x ./gradlew
|
||||
- name: 构建原生镜像
|
||||
if: runner.os == 'Windows'
|
||||
env:
|
||||
# Needed for Windows; to resolve issue with temp folder during native image build, due to relativization
|
||||
# problem when different drives are used, such as in GHA runners.
|
||||
# https://github.com/graalvm/native-build-tools/issues/754
|
||||
# https://github.com/bric3/jufmt/commit/feb040f159b9a5168d677455218b787d9b644ee2
|
||||
GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }}
|
||||
run: ./gradlew nativeCompile
|
||||
- name: 构建原生镜像
|
||||
if: runner.os != 'Windows'
|
||||
run: ./gradlew nativeCompile
|
||||
- name: 上传构建产物
|
||||
uses: actions/upload-artifact@v7
|
||||
with:
|
||||
name: WebAPI Native Image ${{ runner.os }} ${{ runner.arch }}
|
||||
path: build/native/nativeCompile/*
|
||||
# build-native:
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# matrix:
|
||||
# os: [macos-latest, windows-latest, ubuntu-latest]
|
||||
# steps:
|
||||
# - name: 签出仓库
|
||||
# uses: actions/checkout@v7
|
||||
# - name: 安装GraalVM
|
||||
# uses: graalvm/setup-graalvm@v1
|
||||
# with:
|
||||
# java-version: '25'
|
||||
# distribution: 'liberica'
|
||||
# - name: 让gradlew可执行
|
||||
# if: runner.os != 'Windows'
|
||||
# run: chmod +x ./gradlew
|
||||
# - name: 构建原生镜像
|
||||
# if: runner.os == 'Windows'
|
||||
# env:
|
||||
# # Needed for Windows; to resolve issue with temp folder during native image build, due to relativization
|
||||
# # problem when different drives are used, such as in GHA runners.
|
||||
# # https://github.com/graalvm/native-build-tools/issues/754
|
||||
# # https://github.com/bric3/jufmt/commit/feb040f159b9a5168d677455218b787d9b644ee2
|
||||
# GRADLE_OPTS: -Djava.io.tmpdir=${{ runner.temp }}
|
||||
# run: ./gradlew nativeCompile
|
||||
# - name: 构建原生镜像
|
||||
# if: runner.os != 'Windows'
|
||||
# run: ./gradlew nativeCompile
|
||||
# - name: 上传构建产物
|
||||
# uses: actions/upload-artifact@v7
|
||||
# with:
|
||||
# name: WebAPI Native Image ${{ runner.os }} ${{ runner.arch }}
|
||||
# path: build/native/nativeCompile/*
|
||||
Reference in New Issue
Block a user