Skip to content

Commit 456ed08

Browse files
committed
CI: Add CVM github actions
1 parent a45d189 commit 456ed08

File tree

4 files changed

+146
-248
lines changed

4 files changed

+146
-248
lines changed
Lines changed: 7 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This project is a modified version of OpenJDK, licensed under GPL v2.
2+
# Modifications Copyright (C) 2025 ByteDance Inc.
13
#
24
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
35
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -36,42 +38,12 @@ inputs:
3638
runs:
3739
using: composite
3840
steps:
39-
40-
- name: 'Determine bundle names'
41-
id: bundles
42-
run: |
43-
# Rename bundles to consistent names
44-
jdk_bundle_zip="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.zip 2> /dev/null || true)"
45-
jdk_bundle_tar_gz="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
46-
symbols_bundle="$(ls build/*/bundles/jdk-*_bin${{ inputs.debug-suffix }}-symbols.tar.gz 2> /dev/null || true)"
47-
tests_bundle="$(ls build/*/bundles/jdk-*_bin-tests${{ inputs.debug-suffix }}.tar.gz 2> /dev/null || true)"
48-
49-
mkdir bundles
50-
51-
if [[ "$jdk_bundle_zip" != "" ]]; then
52-
mv "$jdk_bundle_zip" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.zip"
53-
fi
54-
if [[ "$jdk_bundle_tar_gz" != "" ]]; then
55-
mv "$jdk_bundle_tar_gz" "bundles/jdk-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
56-
fi
57-
if [[ "$symbols_bundle" != "" ]]; then
58-
mv "$symbols_bundle" "bundles/symbols-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
59-
fi
60-
if [[ "$tests_bundle" != "" ]]; then
61-
mv "$tests_bundle" "bundles/tests-${{ inputs.platform }}${{ inputs.debug-suffix }}.tar.gz"
62-
fi
63-
64-
if [[ "$jdk_bundle_zip$jdk_bundle_tar_gz$symbols_bundle$tests_bundle" != "" ]]; then
65-
echo 'bundles-found=true' >> $GITHUB_OUTPUT
66-
else
67-
echo 'bundles-found=false' >> $GITHUB_OUTPUT
68-
fi
69-
shell: bash
70-
7141
- name: 'Upload bundles artifact'
42+
id: upload-bundles
7243
uses: actions/upload-artifact@v3
7344
with:
74-
name: bundles-${{ inputs.platform }}${{ inputs.debug-suffix }}
75-
path: bundles
45+
name: cvm8+17-${{ inputs.platform }}${{ inputs.debug-suffix }}
46+
path: cvm/build/jdk8
7647
retention-days: 1
77-
if: steps.bundles.outputs.bundles-found == 'true'
48+
if-no-files-found: error
49+
overwrite: true

.github/workflows/build-linux.yml

Lines changed: 20 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# This project is a modified version of OpenJDK, licensed under GPL v2.
2+
# Modifications Copyright (C) 2025 ByteDance Inc.
13
#
24
# Copyright (c) 2022, Oracle and/or its affiliates. All rights reserved.
35
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
@@ -37,11 +39,11 @@ on:
3739
make-target:
3840
required: false
3941
type: string
40-
default: 'product-bundles test-bundles'
42+
default: 'cvm8default17'
4143
debug-levels:
4244
required: false
4345
type: string
44-
default: '[ "debug", "release" ]'
46+
default: '[ "fastdebug", "release" ]'
4547
apt-gcc-version:
4648
required: true
4749
type: string
@@ -55,27 +57,17 @@ on:
5557
jobs:
5658
build-linux:
5759
name: build
58-
runs-on: ubuntu-20.04
60+
runs-on: ubuntu-22.04
5961

6062
strategy:
6163
fail-fast: false
6264
matrix:
6365
debug-level: ${{ fromJSON(inputs.debug-levels) }}
64-
include:
65-
- debug-level: debug
66-
flags: --with-debug-level=fastdebug
67-
suffix: -debug
6866

6967
steps:
7068
- name: 'Checkout the JDK source'
7169
uses: actions/checkout@v3
7270

73-
- name: 'Get the BootJDK'
74-
id: bootjdk
75-
uses: ./.github/actions/get-bootjdk
76-
with:
77-
platform: linux-x64
78-
7971
- name: 'Get JTReg'
8072
id: jtreg
8173
uses: ./.github/actions/get-jtreg
@@ -102,31 +94,23 @@ jobs:
10294
sudo apt-get update
10395
sudo apt-get install --only-upgrade apt
10496
sudo apt-get install gcc-${{ inputs.apt-gcc-version }} g++-${{ inputs.apt-gcc-version }} libxrandr-dev${{ steps.arch.outputs.suffix }} libxtst-dev${{ steps.arch.outputs.suffix }} libcups2-dev${{ steps.arch.outputs.suffix }} libasound2-dev${{ steps.arch.outputs.suffix }} ${{ inputs.apt-extra-packages }}
105-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
106-
107-
- name: 'Configure'
108-
run: >
109-
bash configure
110-
--with-conf-name=${{ inputs.platform }}
111-
${{ matrix.flags }}
112-
--with-version-opt=${GITHUB_ACTOR}-${GITHUB_SHA}
113-
--with-boot-jdk=${{ steps.bootjdk.outputs.path }}
114-
--with-jtreg=${{ steps.jtreg.outputs.path }}
115-
--with-gtest=${{ steps.gtest.outputs.path }}
116-
--enable-jtreg-failure-handler
117-
--with-zlib=system
118-
${{ inputs.extra-conf-options }}
97+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.apt-gcc-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.apt-gcc-version }}
11998
12099
- name: 'Build'
121-
id: build
122-
uses: ./.github/actions/do-build
123-
with:
124-
make-target: '${{ inputs.make-target }}'
125-
platform: ${{ inputs.platform }}
126-
debug-suffix: '${{ matrix.suffix }}'
100+
run: |
101+
make -f cvm.mk ${{ inputs.make-target }} MODE=${{ matrix.debug-level}}
102+
shell: bash
103+
104+
- name: 'Pack bundles'
105+
run: |
106+
tar cvzf cvm8+17-${{ inputs.platform }}-${{ matrix.debug-level}}.tar.gz -C cvm/build jdk8
107+
shell: bash
127108

128109
- name: 'Upload bundles'
129-
uses: ./.github/actions/upload-bundles
110+
uses: actions/upload-artifact@v4
130111
with:
131-
platform: ${{ inputs.platform }}
132-
debug-suffix: '${{ matrix.suffix }}'
112+
name: cvm8+17-${{ inputs.platform }}-${{ matrix.debug-level}}.tar.gz
113+
path: cvm8+17-${{ inputs.platform }}-${{ matrix.debug-level}}.tar.gz
114+
retention-days: 1
115+
if-no-files-found: error
116+
overwrite: true

0 commit comments

Comments
 (0)