Skip to content

Commit

Permalink
fix:fix release
Browse files Browse the repository at this point in the history
Signed-off-by: Chen Kai <281165273grape@gmail.com>
  • Loading branch information
GrapeBaBa committed Dec 16, 2023
1 parent 426b489 commit 98cc5ca
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 16 deletions.
19 changes: 3 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,8 @@
name: GraalVM Native Image

on:
push:
tags:
- '*'
paths-ignore:
- LICENSE
- '*.md'
release:
types: [created]

defaults:
run:
Expand All @@ -31,7 +27,6 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '22.3.2' ]
java-version: [ '21' ]
os: [ macos-latest ]

Expand All @@ -47,7 +42,6 @@ jobs:
- name: ☕ Setup GraalVM Build
uses: graalvm/setup-graalvm@v1
with:
version: ${{ matrix.version }}
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'graalvm'
Expand All @@ -58,8 +52,6 @@ jobs:
- name: 🏗️ Native Image Build & Test
id: native-build
run: |
echo $JAVA_HOME
echo $GRAALVM_HOME
./gradlew buildBinary
mv hildr-node/build/binary/hildr-node hildr-node/build/binary/hildr-node-osx
ls -ltrh hildr-node/build/binary/hildr-node-osx
Expand All @@ -78,7 +70,6 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '22.3.2' ]
java-version: [ '21' ]
os: [ windows-latest ]

Expand All @@ -94,7 +85,6 @@ jobs:
- name: ☕ Setup GraalVM Build
uses: graalvm/setup-graalvm@v1
with:
version: ${{ matrix.version }}
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'graalvm'
Expand All @@ -105,7 +95,7 @@ jobs:
- name: 🏗️ Native Image Build & Test
id: native-build
run: |
./gradlew buildBinary
./gradlew buildBinaryOnWindows
ls -ltrh hildr-node/build/binary/hildr-node.exe
- name: 📤 Upload ${{ matrix.os }} native image
Expand All @@ -122,7 +112,6 @@ jobs:
strategy:
fail-fast: false
matrix:
version: [ '22.3.2' ]
java-version: [ '21' ]
os: [ ubuntu-latest ]

Expand All @@ -138,7 +127,6 @@ jobs:
- name: ☕ Setup GraalVM Build
uses: graalvm/setup-graalvm@v1
with:
version: ${{ matrix.version }}
java-version: ${{ matrix.java-version }}
github-token: ${{ secrets.GITHUB_TOKEN }}
distribution: 'graalvm'
Expand Down Expand Up @@ -174,7 +162,6 @@ jobs:
- name: ☕ Setup GraalVM Build
uses: graalvm/setup-graalvm@v1
with:
version: '22.3.2'
java-version: '21'
distribution: 'graalvm'
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
15 changes: 15 additions & 0 deletions hildr-node/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,21 @@ task buildBinary {
println(out.toString())
}

task buildBinaryOnWindows{
dependsOn copyJarToBinaryDir
def buildBinaryDir = "build/binary"
def out = new ByteArrayOutputStream()
doLast {
exec {
workingDir buildBinaryDir
executable "cmd"
args "/c", "native-image -jar ${project.name}.jar --no-fallback --enable-http --enable-https --enable-preview -H:EnableURLProtocols=http,https --initialize-at-build-time=org.slf4j.LoggerFactory,ch.qos.logback.core.CoreConstants,ch.qos.logback.core.util.Loader,ch.qos.logback.core.util.StatusPrinter,ch.qos.logback.core.status.InfoStatus,ch.qos.logback.classic.Logger,ch.qos.logback.core.rolling.helper.FileNamePattern,ch.qos.logback.classic.Level,ch.qos.logback.core.status.StatusBase,io.opentelemetry.api.trace.ArrayBasedTraceStateBuilder,io.opentelemetry.context.LazyStorage,ch.qos.logback.core.util.FileSize,ch.qos.logback.core.rolling.helper.RollingCalendar,io.opentelemetry.api.internal.ImmutableSpanContext,io.opentelemetry.api.internal.OtelEncodingUtils,ch.qos.logback.classic.PatternLayout,io.opentelemetry.context.ThreadLocalContextStorage,io.opentelemetry.api.trace.PropagatedSpan,io.opentelemetry.context.ContextStorageWrappers,ch.qos.logback.core.rolling.helper.Compressor\$1,io.opentelemetry.api.trace.ImmutableTraceFlags,ch.qos.logback.core.rolling.helper.RollingCalendar\$1,ch.qos.logback.classic.model.ConfigurationModel,ch.qos.logback.core.model.processor.DefaultProcessor\$1,ch.qos.logback.core.model.processor.ImplicitModelHandler\$1,ch.qos.logback.core.subst.Token,ch.qos.logback.core.pattern.parser.Parser,ch.qos.logback.core.subst.Parser\$1,ch.qos.logback.core.util.Duration,ch.qos.logback.core.model.processor.ChainedModelFilter\$1,ch.qos.logback.classic.model.processor.ConfigurationModelHandler,ch.qos.logback.classic.model.processor.LogbackClassicDefaultNestedComponentRules,ch.qos.logback.core.subst.NodeToStringTransformer\$1,ch.qos.logback.core.pattern.parser.TokenStream\$1,ch.qos.logback.core.subst.Tokenizer\$1 --initialize-at-run-time=io.netty.channel.AbstractChannel,io.netty.channel.socket.nio.SelectorProviderUtil,io.netty.util.concurrent.DefaultPromise,io.netty,org.slf4j.MDC,org.github.gestalt.config ${project.name}"
standardOutput out
}
}
println(out.toString())
}

task buildBinaryStaticNoG1GC {
dependsOn copyJarToBinaryDir
def buildBinaryDir = "build/binary"
Expand Down

0 comments on commit 98cc5ca

Please sign in to comment.