Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Misc] Add criu in built jdk #871

Merged
merged 1 commit into from
Oct 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
#

name: 'Build serverless-adapter'
name: 'Build additional components'
description: 'Build it using built JDK'
inputs:
platform:
Expand Down Expand Up @@ -91,6 +91,45 @@ runs:
cp -f serverless-adapter/output/libloadclassagent.so ${{ steps.bundle_decompress.outputs.java_home }}/lib/serverless/libloadclassagent.so
shell: bash

- name: 'Get latest criu release'
id: get_criu_release
uses: actions/github-script@v6
with:
script: |
const repoOwner = 'dragonwell-project';
const repoName = 'criu';
const { data: release } = await github.rest.repos.getLatestRelease({
owner: repoOwner,
repo: repoName,
});
return release;

- name: 'Download asset and copy into jdk'
run: |
if [ "${{ inputs.platform }}" = "linux-aarch64" ];then
keyword=arm64
elif [ "${{ inputs.platform }}" = "linux-x64" ];then
keyword=x64
else
echo "unsupport platform ${{ inputs.platform }}"
exit 1
fi
url=""
echo "${{ steps.get_criu_release.outputs.assets }}" | jq -c '.[]' | while read asset; do
name="$(echo ${asset} | jq -r '.name')"
if [ -n "$(echo ${name} | grep ${keyword})" ];then
url="$(echo ${asset} | jq -r '.url')"
break
fi
done
if [ -n "${url}" ];then
curl -OLSk -C - --retry 5 ${url} -o criu.tar.gz
tar zxvf criu.tar.gz
chmod +x criu
mv criu ${{ steps.bundle_decompress.outputs.java_home }}/lib/
fi
shell: bash

- name: 'Regenerate bundle'
run: |
cd ${{ steps.bundle_decompress.outputs.bundle_home }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/build-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ jobs:
else
extra_packages=
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 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 jq
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'

Expand Down Expand Up @@ -143,9 +143,9 @@ jobs:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'

- name: 'Build serverless-adapter'
id: build-serverless-adapter
uses: ./.github/actions/build-serverless-adapter
- name: 'Build additional components'
id: build-additional-components
uses: ./.github/actions/build-additional-components
with:
platform: ${{ inputs.platform }}
debug-suffix: '${{ matrix.suffix }}'
Expand Down
Loading