You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2026/03/13 03:41:58 UTC
(skywalking-graalvm-distro) branch main updated (f7e3917 -> b9511ec)
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a change to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
from f7e3917 Enhance release CI: add macOS builds, commit-based Docker tag, unified release page
new 56fcd2a Add changes/changes.md for initial release
new b9511ec Unify CI and release into single workflow with macOS builds
The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
.github/workflows/ci.yml | 174 ++++++++++++++++++++++-
.github/workflows/release.yml | 317 ------------------------------------------
changes/changes.md | 74 ++++++++++
3 files changed, 241 insertions(+), 324 deletions(-)
delete mode 100644 .github/workflows/release.yml
create mode 100644 changes/changes.md
(skywalking-graalvm-distro) 01/02: Add changes/changes.md for initial release
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
commit 56fcd2af45da894db7f7db85454cc4633a066d09
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Fri Mar 13 11:40:19 2026 +0800
Add changes/changes.md for initial release
---
changes/changes.md | 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 74 insertions(+)
diff --git a/changes/changes.md b/changes/changes.md
new file mode 100644
index 0000000..915ed93
--- /dev/null
+++ b/changes/changes.md
@@ -0,0 +1,74 @@
+# Changes
+
+## 1.0.0
+
+### Highlights
+
+Apache SkyWalking GraalVM Distro is a GraalVM native image distribution of the Apache SkyWalking OAP server.
+It compiles the full-featured OAP server into a single native binary (~200MB), delivering instant startup
+and reduced memory footprint compared to the standard JVM distribution.
+
+This is the initial release, built on top of Apache SkyWalking OAP server.
+
+### Build-Time Compilation
+
+- Build-time OAL engine: pre-compile ~1285 metrics/builder/dispatcher classes via Javassist at Maven compile time.
+- Build-time MAL compiler: pre-compile ~1250 MAL expressions from 71 YAML rule files into `MalExpression` classes.
+- Build-time LAL compiler: pre-compile ~10 LAL scripts from 8 YAML files into `LalExpression` classes.
+- Build-time Hierarchy compiler: pre-compile ~4 hierarchy matching rules into `BiFunction` classes.
+- Build-time MeterSystem: pre-generate ~1188 meter function subclasses via Javassist.
+- Auto-generate `reflect-config.json` by scanning HTTP handlers, GraphQL resolvers/types, config POJOs, and DSL manifests.
+
+### GraalVM Native Image Compatibility
+
+- Replace Groovy runtime with pure Java: MAL DSL, LAL DSL, and Hierarchy rules all use ANTLR4 + Javassist v2 engines.
+- Replace Guava `ClassPath.from()` classpath scanning with build-time manifests for annotations, dispatchers, and source receivers.
+- Replace `Field.setAccessible()` reflection in config loading with Lombok `@Setter`-based property copying.
+- Replace `ServiceLoader` SPI discovery with direct provider wiring in `ModuleDefine`.
+- Lazy `HttpClient` initialization in `HttpAlarmCallback` (static final field breaks native image).
+- Direct JDK 25 virtual thread API calls instead of reflection in `VirtualThreads`.
+
+### Same-FQCN Replacement Classes
+
+- `OALEngineLoaderService` — load OAL classes from manifests.
+- `AnnotationScan` — read annotation manifests instead of classpath scan.
+- `SourceReceiverImpl` — read dispatcher manifests instead of classpath scan.
+- `MeterSystem` — load pre-generated MeterFunction classes from manifest.
+- `CoreModuleConfig` — added `@Setter` at class level.
+- `HierarchyDefinitionService` / `HierarchyService` — Java-backed closures instead of GroovyShell.
+- `HttpAlarmCallback` — lazy HttpClient initialization.
+- MAL `DSL` / `FilterExpression` — load pre-compiled expressions from per-file manifests.
+- LAL `DSL` — load pre-compiled expressions from manifest.
+- `ModuleDefine` — direct provider wiring without ServiceLoader.
+- `VirtualThreads` — direct JDK 25 API calls.
+- `YamlConfigLoaderUtils` — Lombok setters instead of reflection.
+- Config-only `@Setter` additions: `AnalyzerModuleConfig`, `LogAnalyzerModuleConfig`, `EnvoyMetricReceiverConfig`, `OtelMetricReceiverConfig`, `EBPFReceiverModuleConfig`, `AWSFirehoseReceiverModuleConfig`, `CiliumFetcherConfig`, `StatusQueryConfig`, `HealthCheckerConfig`.
+- Config loaders: `Rules`, `LALConfigs`, `MeterConfigs` — load from JSON manifests instead of filesystem YAML.
+
+### Distribution and Packaging
+
+- JVM distribution: repackaged OAP server with all replacement classes via `maven-shade-plugin`.
+- Native distribution: single binary (~200MB) with config files, LICENSE, NOTICE, and third-party licenses.
+- Docker image: `ghcr.io/apache/skywalking-graalvm-distro` based on `debian:bookworm-slim`.
+- Multi-arch Docker images: `linux/amd64` and `linux/arm64`.
+- macOS native binaries: `amd64` (Intel) and `arm64` (Apple Silicon).
+
+### Testing
+
+- 73 MAL comparison tests: dual-path verification (fresh v2 compilation vs pre-compiled classes).
+- LAL pre-compilation tests: verify all 8 LAL YAML files load from manifest.
+- Hierarchy comparison tests: verify pre-compiled rules match fresh compilation.
+- Replacement class staleness detector: SHA-256 tracking of upstream source files.
+- YAML staleness detector: SHA-256 tracking of ~49 YAML rule files.
+
+### E2E Tests
+
+- Baseline test: BanyanDB storage with alarm webhook verification.
+- Simple Java agent test: trace collection with native OAP.
+- Istio ALS test: Envoy access log service integration.
+- Event, menu, alarm, log, meter, trace-profiling, telegraf, zabbix, and zipkin test cases.
+
+### CI/CD
+
+- GitHub Actions CI: build, test, license check, and E2E tests.
+- Release workflow: manual trigger with commit SHA, multi-arch Linux + macOS builds, Docker manifest with version and commit tags, GitHub Release page with checksums.
(skywalking-graalvm-distro) 02/02: Unify CI and release into single workflow with macOS builds
Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wusheng pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
commit b9511ece60cfd6b8b14e82b29c8d4349c0f8fb0a
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Fri Mar 13 11:41:53 2026 +0800
Unify CI and release into single workflow with macOS builds
- Merge release.yml into ci.yml: tag push or manual dispatch with version
triggers release (GitHub Release page + version Docker tag)
- Add macOS native builds (amd64 via macos-13, arm64 via macos-14)
- Docker manifest tags: commit-sha always; version + latest for releases
- CI-only builds (push to main): compile, test, e2e, commit-sha Docker tag
- Release builds (tag or manual): skip e2e, build all platforms, publish
---
.github/workflows/ci.yml | 174 ++++++++++++++++++++++-
.github/workflows/release.yml | 317 ------------------------------------------
2 files changed, 167 insertions(+), 324 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 3aa0103..7c08e5d 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -18,9 +18,20 @@ name: CI
on:
push:
branches: [ main ]
+ tags:
+ - 'v*'
pull_request:
branches: [ main ]
workflow_dispatch:
+ inputs:
+ commit:
+ description: 'Commit SHA to build (leave empty for latest on current branch)'
+ required: false
+ default: ''
+ version:
+ description: 'Version label for release artifacts (e.g. 1.0.0-rc1). Leave empty for CI-only build.'
+ required: false
+ default: ''
concurrency:
group: ci-${{ github.ref }}
@@ -33,6 +44,7 @@ jobs:
license-header:
name: License Header Check
runs-on: ubuntu-latest
+ if: github.event_name != 'workflow_dispatch' || github.event.inputs.version == ''
steps:
- name: Checkout
uses: actions/checkout@v5
@@ -46,12 +58,32 @@ jobs:
runs-on: ubuntu-latest
outputs:
cache-key: ${{ steps.cache-key.outputs.key }}
+ commit-sha: ${{ steps.meta.outputs.commit-sha }}
+ version: ${{ steps.meta.outputs.version }}
+ is-release: ${{ steps.meta.outputs.is-release }}
steps:
- name: Checkout with submodules
uses: actions/checkout@v5
with:
+ ref: ${{ github.event.inputs.commit || github.ref }}
submodules: recursive
+ - name: Resolve build metadata
+ id: meta
+ run: |
+ echo "commit-sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
+ # Determine if this is a release build
+ if [[ "${{ github.ref_type }}" == "tag" ]]; then
+ echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
+ echo "is-release=true" >> "$GITHUB_OUTPUT"
+ elif [[ -n "${{ github.event.inputs.version }}" ]]; then
+ echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
+ echo "is-release=true" >> "$GITHUB_OUTPUT"
+ else
+ echo "version=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
+ echo "is-release=false" >> "$GITHUB_OUTPUT"
+ fi
+
- name: Set up GraalVM JDK 25
uses: graalvm/setup-graalvm@v1
with:
@@ -78,6 +110,7 @@ jobs:
name: Build & Test
runs-on: ubuntu-latest
needs: init-skywalking
+ if: needs.init-skywalking.outputs.is-release == 'false'
steps:
- name: Checkout with submodules
uses: actions/checkout@v5
@@ -108,9 +141,9 @@ jobs:
- name: Build distribution
run: make build-distro
- # ── Native image build per architecture ──
- build-native:
- name: Native ${{ matrix.arch }}
+ # ── Native image build for Linux (per architecture) ──
+ build-native-linux:
+ name: Native Linux ${{ matrix.arch }}
runs-on: ${{ matrix.runner }}
needs: init-skywalking
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
@@ -130,6 +163,7 @@ jobs:
- name: Checkout with submodules
uses: actions/checkout@v5
with:
+ ref: ${{ github.event.inputs.commit || github.ref }}
submodules: recursive
- name: Set up GraalVM JDK 25
@@ -178,6 +212,15 @@ jobs:
digest="${{ steps.build.outputs.digest }}"
touch "/tmp/digests/${digest#sha256:}"
+ - name: Rename tarball with arch and version
+ id: rename
+ run: |
+ VERSION="${{ needs.init-skywalking.outputs.version }}"
+ SRC=$(ls oap-graalvm-native/target/oap-graalvm-native-*-native-dist.tar.gz)
+ DEST="oap-graalvm-native/target/apache-skywalking-graalvm-distro-${VERSION}-linux-${{ matrix.arch }}.tar.gz"
+ cp "${SRC}" "${DEST}"
+ echo "path=${DEST}" >> "$GITHUB_OUTPUT"
+
- name: Upload digest
uses: actions/upload-artifact@v5
with:
@@ -186,6 +229,14 @@ jobs:
if-no-files-found: error
retention-days: 1
+ - name: Upload native tarball
+ uses: actions/upload-artifact@v5
+ with:
+ name: native-tarball-linux-${{ matrix.arch }}
+ path: ${{ steps.rename.outputs.path }}
+ if-no-files-found: error
+ retention-days: 1
+
- name: Save Docker image for e2e (amd64 only)
if: matrix.arch == 'amd64'
run: |
@@ -202,11 +253,64 @@ jobs:
path: /tmp/skywalking-oap-native.tar
retention-days: 1
+ # ── Native image build for macOS (per architecture) ──
+ build-native-macos:
+ name: Native macOS ${{ matrix.arch }}
+ runs-on: ${{ matrix.runner }}
+ needs: init-skywalking
+ if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
+ strategy:
+ matrix:
+ include:
+ - arch: amd64
+ runner: macos-13
+ - arch: arm64
+ runner: macos-14
+ steps:
+ - name: Checkout with submodules
+ uses: actions/checkout@v5
+ with:
+ ref: ${{ github.event.inputs.commit || github.ref }}
+ submodules: recursive
+
+ - name: Set up GraalVM JDK 25
+ uses: graalvm/setup-graalvm@v1
+ with:
+ java-version: '25'
+ distribution: 'graalvm'
+
+ - name: Restore Maven cache
+ uses: actions/cache/restore@v5
+ with:
+ path: ~/.m2/repository
+ key: ${{ needs.init-skywalking.outputs.cache-key }}
+
+ - name: Build native image
+ run: make native-image
+
+ - name: Rename tarball with arch and version
+ id: rename
+ run: |
+ VERSION="${{ needs.init-skywalking.outputs.version }}"
+ SRC=$(ls oap-graalvm-native/target/oap-graalvm-native-*-native-dist.tar.gz)
+ DEST="oap-graalvm-native/target/apache-skywalking-graalvm-distro-${VERSION}-macos-${{ matrix.arch }}.tar.gz"
+ cp "${SRC}" "${DEST}"
+ echo "path=${DEST}" >> "$GITHUB_OUTPUT"
+
+ - name: Upload native tarball
+ uses: actions/upload-artifact@v5
+ with:
+ name: native-tarball-macos-${{ matrix.arch }}
+ path: ${{ steps.rename.outputs.path }}
+ if-no-files-found: error
+ retention-days: 1
+
# ── E2E tests using pre-built native image ──
e2e:
name: E2E ${{ matrix.test.name }}
runs-on: ubuntu-latest
- needs: [init-skywalking, build-native]
+ needs: [init-skywalking, build-native-linux]
+ if: needs.init-skywalking.outputs.is-release == 'false'
timeout-minutes: 30
env:
SW_AGENT_JDK_VERSION: 17
@@ -293,7 +397,7 @@ jobs:
docker-manifest:
name: Docker Manifest
runs-on: ubuntu-latest
- needs: build-native
+ needs: [init-skywalking, build-native-linux]
permissions:
contents: read
packages: write
@@ -318,7 +422,63 @@ jobs:
- name: Create and push manifest
working-directory: /tmp/digests
run: |
+ VERSION="${{ needs.init-skywalking.outputs.version }}"
+ COMMIT_SHA="${{ needs.init-skywalking.outputs.commit-sha }}"
+ IS_RELEASE="${{ needs.init-skywalking.outputs.is-release }}"
+ TAGS="-t ${{ env.IMAGE }}:${COMMIT_SHA}"
+ if [[ "${IS_RELEASE}" == "true" ]]; then
+ TAGS="${TAGS} -t ${{ env.IMAGE }}:${VERSION} -t ${{ env.IMAGE }}:latest"
+ fi
docker buildx imagetools create \
- -t ${{ env.IMAGE }}:latest \
- -t ${{ env.IMAGE }}:${GITHUB_SHA} \
+ ${TAGS} \
$(printf '${{ env.IMAGE }}@sha256:%s ' *)
+
+ # ── Upload tarballs to GitHub Release (release builds only) ──
+ github-release:
+ name: GitHub Release
+ runs-on: ubuntu-latest
+ needs: [init-skywalking, build-native-linux, build-native-macos]
+ if: needs.init-skywalking.outputs.is-release == 'true'
+ permissions:
+ contents: write
+ steps:
+ - name: Checkout with submodules
+ uses: actions/checkout@v5
+ with:
+ ref: ${{ github.event.inputs.commit || github.ref }}
+ submodules: true
+ fetch-depth: 0
+
+ - name: Generate version metadata
+ run: |
+ VERSION="${{ needs.init-skywalking.outputs.version }}"
+ SW_COMMIT=$(git -C skywalking rev-parse HEAD)
+ SW_TAG=$(git -C skywalking describe --tags --exact-match "${SW_COMMIT}" 2>/dev/null || echo "none")
+ cat > /tmp/apache-skywalking-graalvm-distro-${VERSION}-version.txt <<EOF
+ Version: ${VERSION}
+ SkyWalking-Commit: ${SW_COMMIT}
+ SkyWalking-Tag: ${SW_TAG}
+ Build-Time: $(date -u +%Y-%m-%dT%H:%M:%SZ)
+ EOF
+
+ - name: Download all native tarballs
+ uses: actions/download-artifact@v5
+ with:
+ path: /tmp/tarballs
+ pattern: native-tarball-*
+ merge-multiple: true
+
+ - name: Collect release files and generate checksums
+ run: |
+ cp /tmp/apache-skywalking-graalvm-distro-*-version.txt /tmp/tarballs/
+ cd /tmp/tarballs
+ for f in *.tar.gz; do
+ sha512sum "${f}" > "${f}.sha512"
+ done
+
+ - name: Upload to GitHub Release
+ uses: softprops/action-gh-release@v2
+ with:
+ tag_name: v${{ needs.init-skywalking.outputs.version }}
+ files: /tmp/tarballs/*
+ generate_release_notes: true
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
deleted file mode 100644
index c3c7b54..0000000
--- a/.github/workflows/release.yml
+++ /dev/null
@@ -1,317 +0,0 @@
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements. See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You 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: Release
-
-on:
- push:
- tags:
- - 'v*'
- workflow_dispatch:
- inputs:
- commit:
- description: 'Commit SHA to release (leave empty for latest on current branch)'
- required: false
- default: ''
- version:
- description: 'Version label for artifacts (e.g. 1.0.0-rc1). Required for manual trigger.'
- required: true
-
-env:
- IMAGE: ghcr.io/apache/skywalking-graalvm-distro
- # Resolve ref: manual trigger uses input commit (or empty for branch HEAD)
- RELEASE_REF: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.commit || '' }}
-
-jobs:
- # ── Shared: init skywalking submodule and cache .m2/repository ──
- init-skywalking:
- name: Init SkyWalking Submodule
- runs-on: ubuntu-latest
- outputs:
- cache-key: ${{ steps.cache-key.outputs.key }}
- version: ${{ steps.version.outputs.version }}
- commit-sha: ${{ steps.commit-sha.outputs.sha }}
- steps:
- - name: Checkout with submodules
- uses: actions/checkout@v5
- with:
- ref: ${{ env.RELEASE_REF || github.ref }}
- submodules: recursive
-
- - name: Resolve version
- id: version
- run: |
- if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
- echo "version=${{ github.event.inputs.version }}" >> "$GITHUB_OUTPUT"
- else
- echo "version=${GITHUB_REF_NAME#v}" >> "$GITHUB_OUTPUT"
- fi
-
- - name: Resolve commit SHA
- id: commit-sha
- run: echo "sha=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
-
- - name: Set up GraalVM JDK 25
- uses: graalvm/setup-graalvm@v1
- with:
- java-version: '25'
- distribution: 'graalvm'
-
- - name: Compute cache key
- id: cache-key
- run: echo "key=m2-skywalking-$(git -C skywalking rev-parse HEAD)" >> "$GITHUB_OUTPUT"
-
- - name: Restore Maven cache
- id: cache
- uses: actions/cache@v5
- with:
- path: ~/.m2/repository
- key: ${{ steps.cache-key.outputs.key }}
-
- - name: Install SkyWalking submodule to Maven cache
- if: steps.cache.outputs.cache-hit != 'true'
- run: make init-skywalking
-
- # ── Native image build for Linux (per architecture) ──
- build-native-linux:
- name: Native Linux ${{ matrix.arch }}
- runs-on: ${{ matrix.runner }}
- needs: init-skywalking
- strategy:
- matrix:
- include:
- - arch: amd64
- runner: ubuntu-latest
- platform: linux/amd64
- - arch: arm64
- runner: ubuntu-24.04-arm
- platform: linux/arm64
- permissions:
- contents: read
- packages: write
- steps:
- - name: Checkout with submodules
- uses: actions/checkout@v5
- with:
- ref: ${{ env.RELEASE_REF || github.ref }}
- submodules: recursive
-
- - name: Set up GraalVM JDK 25
- uses: graalvm/setup-graalvm@v1
- with:
- java-version: '25'
- distribution: 'graalvm'
-
- - name: Restore Maven cache
- uses: actions/cache/restore@v5
- with:
- path: ~/.m2/repository
- key: ${{ needs.init-skywalking.outputs.cache-key }}
-
- - name: Build native image
- run: make native-image
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Log in to GHCR
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Locate distro tarball
- id: dist
- run: echo "path=$(ls oap-graalvm-native/target/oap-graalvm-native-*-native-dist.tar.gz)" >> "$GITHUB_OUTPUT"
-
- - name: Build and push by digest
- id: build
- uses: docker/build-push-action@v6
- with:
- context: .
- file: docker/Dockerfile.native
- platforms: ${{ matrix.platform }}
- build-args: |
- DIST=${{ steps.dist.outputs.path }}
- outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=true
-
- - name: Export digest
- run: |
- mkdir -p /tmp/digests
- digest="${{ steps.build.outputs.digest }}"
- touch "/tmp/digests/${digest#sha256:}"
-
- - name: Rename tarball with arch and version
- id: rename
- run: |
- VERSION="${{ needs.init-skywalking.outputs.version }}"
- SRC=$(ls oap-graalvm-native/target/oap-graalvm-native-*-native-dist.tar.gz)
- DEST="oap-graalvm-native/target/apache-skywalking-graalvm-distro-${VERSION}-linux-${{ matrix.arch }}.tar.gz"
- cp "${SRC}" "${DEST}"
- echo "path=${DEST}" >> "$GITHUB_OUTPUT"
-
- - name: Upload digest
- uses: actions/upload-artifact@v5
- with:
- name: digests-${{ matrix.arch }}
- path: /tmp/digests/*
- if-no-files-found: error
- retention-days: 1
-
- - name: Upload native tarball
- uses: actions/upload-artifact@v5
- with:
- name: native-tarball-linux-${{ matrix.arch }}
- path: ${{ steps.rename.outputs.path }}
- if-no-files-found: error
- retention-days: 1
-
- # ── Native image build for macOS (per architecture) ──
- build-native-macos:
- name: Native macOS ${{ matrix.arch }}
- runs-on: ${{ matrix.runner }}
- needs: init-skywalking
- strategy:
- matrix:
- include:
- - arch: amd64
- runner: macos-13
- - arch: arm64
- runner: macos-14
- steps:
- - name: Checkout with submodules
- uses: actions/checkout@v5
- with:
- ref: ${{ env.RELEASE_REF || github.ref }}
- submodules: recursive
-
- - name: Set up GraalVM JDK 25
- uses: graalvm/setup-graalvm@v1
- with:
- java-version: '25'
- distribution: 'graalvm'
-
- - name: Restore Maven cache
- uses: actions/cache/restore@v5
- with:
- path: ~/.m2/repository
- key: ${{ needs.init-skywalking.outputs.cache-key }}
-
- - name: Build native image
- run: make native-image
-
- - name: Rename tarball with arch and version
- id: rename
- run: |
- VERSION="${{ needs.init-skywalking.outputs.version }}"
- SRC=$(ls oap-graalvm-native/target/oap-graalvm-native-*-native-dist.tar.gz)
- DEST="oap-graalvm-native/target/apache-skywalking-graalvm-distro-${VERSION}-macos-${{ matrix.arch }}.tar.gz"
- cp "${SRC}" "${DEST}"
- echo "path=${DEST}" >> "$GITHUB_OUTPUT"
-
- - name: Upload native tarball
- uses: actions/upload-artifact@v5
- with:
- name: native-tarball-macos-${{ matrix.arch }}
- path: ${{ steps.rename.outputs.path }}
- if-no-files-found: error
- retention-days: 1
-
- # ── Merge per-arch images into multi-arch manifest with version + commit tags ──
- docker-manifest:
- name: Docker Manifest
- runs-on: ubuntu-latest
- needs: [init-skywalking, build-native-linux]
- permissions:
- contents: read
- packages: write
- steps:
- - name: Download digests
- uses: actions/download-artifact@v5
- with:
- path: /tmp/digests
- pattern: digests-*
- merge-multiple: true
-
- - name: Set up Docker Buildx
- uses: docker/setup-buildx-action@v3
-
- - name: Log in to GHCR
- uses: docker/login-action@v3
- with:
- registry: ghcr.io
- username: ${{ github.actor }}
- password: ${{ secrets.GITHUB_TOKEN }}
-
- - name: Create and push manifest
- working-directory: /tmp/digests
- run: |
- VERSION="${{ needs.init-skywalking.outputs.version }}"
- COMMIT_SHA="${{ needs.init-skywalking.outputs.commit-sha }}"
- docker buildx imagetools create \
- -t ${{ env.IMAGE }}:${VERSION} \
- -t ${{ env.IMAGE }}:${COMMIT_SHA} \
- -t ${{ env.IMAGE }}:latest \
- $(printf '${{ env.IMAGE }}@sha256:%s ' *)
-
- # ── Upload tarballs to GitHub Release ──
- github-release:
- name: GitHub Release
- runs-on: ubuntu-latest
- needs: [init-skywalking, build-native-linux, build-native-macos]
- permissions:
- contents: write
- steps:
- - name: Checkout with submodules
- uses: actions/checkout@v5
- with:
- ref: ${{ env.RELEASE_REF || github.ref }}
- submodules: true
- fetch-depth: 0
-
- - name: Generate version metadata
- run: |
- VERSION="${{ needs.init-skywalking.outputs.version }}"
- SW_COMMIT=$(git -C skywalking rev-parse HEAD)
- SW_TAG=$(git -C skywalking describe --tags --exact-match "${SW_COMMIT}" 2>/dev/null || echo "none")
- cat > /tmp/apache-skywalking-graalvm-distro-${VERSION}-version.txt <<EOF
- Version: ${VERSION}
- SkyWalking-Commit: ${SW_COMMIT}
- SkyWalking-Tag: ${SW_TAG}
- Build-Time: $(date -u +%Y-%m-%dT%H:%M:%SZ)
- EOF
-
- - name: Download all native tarballs
- uses: actions/download-artifact@v5
- with:
- path: /tmp/tarballs
- pattern: native-tarball-*
- merge-multiple: true
-
- - name: Collect release files and generate checksums
- run: |
- cp /tmp/apache-skywalking-graalvm-distro-*-version.txt /tmp/tarballs/
- cd /tmp/tarballs
- for f in *.tar.gz; do
- sha512sum "${f}" > "${f}.sha512"
- done
-
- - name: Upload to GitHub Release
- uses: softprops/action-gh-release@v2
- with:
- tag_name: v${{ needs.init-skywalking.outputs.version }}
- files: /tmp/tarballs/*
- generate_release_notes: true