Skip to content

Commit

Permalink
[Misc] Reduce runner permissions
Browse files Browse the repository at this point in the history
Summary: reduce arm runner permissions and update actions config

Testing: CI pipline

Reviewers: lei.yul, sendaoYan

Issue: dragonwell-project#840
  • Loading branch information
Accelerator1996 committed Jul 9, 2024
1 parent 66495b3 commit d143b83
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ jobs:
build-linux:
name: build
runs-on: ${{fromJson(inputs.runs-on)}}
#runs-on: 'ubuntu-20.04'

strategy:
fail-fast: false
Expand Down Expand Up @@ -118,6 +117,7 @@ jobs:
fi
sudo apt-get install -y gcc-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} g++-${{ inputs.gcc-major-version }}${{ inputs.gcc-package-suffix }} 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 }} $extra_packages
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ inputs.gcc-major-version }} 100 --slave /usr/bin/g++ g++ /usr/bin/g++-${{ inputs.gcc-major-version }}
if: inputs.platform != 'linux-aarch64'

- name: 'Configure'
run: >
Expand Down
19 changes: 15 additions & 4 deletions .github/workflows/build-riscv.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ on:
jobs:
build-linux:
name: build
runs-on: [self-hosted , X64]
container:
image: docker.io/alibabadragonwelljdk/centos7_gcc7_build_image:latest
runs-on: ubuntu-20.04

strategy:
fail-fast: false
Expand All @@ -74,6 +72,19 @@ jobs:
- name: 'Checkout the JDK source'
uses: actions/checkout@v2

- name: 'Install Boot JDK'
run: |
wget https://dragonwell.oss-cn-shanghai.aliyuncs.com/11.0.23.20.9/Alibaba_Dragonwell_Extended_11.0.23.20.9_x64_linux.tar.gz -O jdk.tar.gz
mkdir -p /usr/lib/jvm/jdk-11
tar zxvf jdk.tar.gz -C /usr/lib/jvm/jdk-11 --strip-components=1
rm -rf jdk.tar.gz
- name: 'Install riscv64 toolchain'
run: |
wget https://compiler-tools.oss-cn-hangzhou.aliyuncs.com/riscv64-build/riscv_opt.tar.gz -O riscv_opt.tar.gz
tar zxvf riscv_opt.tar.gz -C /opt/
rm -rf riscv_opt.tar.gz
- name: 'Configure'
run: >
LD_LIBRARY_PATH=/opt/riscv_toolchain_linux/lib64
Expand All @@ -88,7 +99,7 @@ jobs:
--without-version-pre
--with-version-build=9
--with-version-patch=14
--with-boot-jdk=/usr/lib/jvm/jdk-10
--with-boot-jdk=/usr/lib/jvm/jdk-11
--with-native-debug-symbols=external
--with-jvm-variants=server
--disable-warnings-as-errors
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,7 @@ on:
platforms:
description: 'Platform(s) to execute on (comma separated, e.g. "linux-x64, macos, aarch64")'
required: true
#default: 'linux-x64, linux-cross-compile, windows-x64'
#default: 'linux-x64, linux-aarch64'
default: 'linux aarch64'
default: 'linux-x64, linux-aarch64, linux-cross-compile, windows-x64'
configure-arguments:
description: 'Additional configure arguments'
required: false
Expand Down

0 comments on commit d143b83

Please sign in to comment.