Sanchda/rust demangling #276
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI Run | |
concurrency: | |
group: pr-ci_${{ github.event.pull_request.number }} | |
cancel-in-progress: true | |
on: | |
push: | |
branches: | |
- '*' | |
tags-ignore: | |
- v* | |
pull_request: | |
jobs: | |
check-for-pr: | |
runs-on: ubuntu-latest | |
outputs: | |
skip: ${{ steps.check.outputs.skip }} | |
steps: | |
- name: Check if PR exists | |
id: check | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if [ -z "${{ github.base_ref }}" ]; then | |
prs=$(gh pr list \ | |
--repo "$GITHUB_REPOSITORY" \ | |
--json baseRefName,headRefName \ | |
--jq ' | |
map(select(.baseRefName == "${{ github.base_ref }}" and .headRefName == "${{ github.head_ref }}")) | |
| length | |
') | |
if ((prs > 0)); then | |
echo "skip=true" >> "$GITHUB_OUTPUT" | |
fi | |
fi | |
test-linux-glibc: | |
needs: check-for-pr | |
if: needs.check-for-pr.outputs.skip != 'true' | |
strategy: | |
matrix: | |
java_version: [8u362+9, 11.0.18+10, 17.0.6+10, 20.0.1+10] | |
runs-on: ubuntu-latest | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare build JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: "11" | |
- name: Prepare JDK ${{ matrix.java_version }} | |
run: | | |
wget -nv https://download.bell-sw.com/java/${{ matrix.java_version }}/bellsoft-jdk${{ matrix.java_version }}-linux-amd64.tar.gz -O jdk.tar.gz | |
tar xzf *.tar.gz | |
find . -type d -name 'jdk*' -maxdepth 1| xargs -I {} mv {} test_jdk | |
- name: Test | |
run: | | |
export TEST_COMMIT=${{ github.sha }} | |
export TEST_CONFIGURATION=glibc/${{ matrix.java_version }} | |
export LIBC=glibc | |
export JAVA_TEST_HOME=$(pwd)/test_jdk | |
export BUILD_TYPE=SanitizedDebug | |
chmod a+x ddprof-lib/test.sh | |
./gradlew :ddprof-test:test --info | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports-linux-glibc-${{ matrix.java_version }}.zip | |
path: | | |
ddprof-test/hs_err_* | |
ddprof-test/build/reports/tests | |
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log | |
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: x64-glibc | |
path: build/ | |
test-ubuntu-jdk: | |
needs: check-for-pr | |
if: needs.check-for-pr.outputs.skip != 'true' | |
strategy: | |
matrix: | |
java_version: [11, 17] | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare build JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: "11" | |
- name: Prepare JDK ${{ matrix.java_version }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install openjdk-${{ matrix.java_version }}-jdk | |
uname -r | |
- name: Test | |
run: | | |
export TEST_COMMIT=${{ github.sha }} | |
export TEST_CONFIGURATION=glibc/${{ matrix.java_version }} | |
export LIBC=glibc | |
export JAVA_TEST_HOME=/usr/lib/jvm/java-${{ matrix.java_version }}-openjdk-amd64 | |
export JAVA_HOME=$JAVA_HOME | |
export PATH=$JAVA_HOME/bin:$PATH | |
export BUILD_TYPE=SanitizedDebug | |
./gradlew :ddprof-test:test --info | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports-linux-ubuntu-jdk-${{ matrix.java_version }}.zip | |
path: | | |
ddprof-test/hs_err_* | |
ddprof-test/build/reports/tests | |
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log | |
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: x64-ubuntu-jdk | |
path: build/ | |
test-linux-glibc-j9: | |
needs: check-for-pr | |
if: needs.check-for-pr.outputs.skip != 'true' | |
strategy: | |
matrix: | |
java_version: [8, 11, 17] | |
runs-on: ubuntu-latest | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare test JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt-openj9' | |
java-version: "${{ matrix.java_version }}" | |
- name: Store JAVA_TEST_HOME | |
run: JAVA_PATH=$(which java) && echo "JAVA_TEST_HOME=${JAVA_PATH/\/bin\/java/\/}" >> $GITHUB_ENV | |
- name: Prepare build JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'adopt-openj9' | |
java-version: "11" | |
- name: Test | |
run: | | |
export TEST_COMMIT=${{ github.sha }} | |
export TEST_CONFIGURATION=glibc/${{ matrix.java_version }} | |
export LIBC=glibc | |
export BUILD_TYPE=SanitizedDebug | |
chmod a+x gradlew | |
chmod a+x ddprof-lib/test.sh | |
./gradlew :ddprof-test:test --info | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports-linux-glibc-j9-${{ matrix.java_version }}.zip | |
path: | | |
ddprof-test/javacore* | |
ddprof-test/build/reports/tests | |
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log | |
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: x64-glibc-j9 | |
path: build/ | |
test-linux-glibc-oracle8: | |
needs: check-for-pr | |
if: needs.check-for-pr.outputs.skip != 'true' | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare build JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: "11" | |
- name: Prepare JDK ${{ matrix.java_version }} | |
run: | | |
sudo apt-get -y update && sudo apt-get -y install curl | |
set -eux; | |
sudo mkdir -p /usr/lib/jvm/oracle8; | |
# https://gist.github.com/wavezhang/ba8425f24a968ec9b2a8619d7c2d86a6?permalink_comment_id=4444663#gistcomment-4444663 | |
# jdk1.8.0_361 | |
curl -L --fail "https://javadl.oracle.com/webapps/download/AutoDL?BundleId=247926_0ae14417abb444ebb02b9815e2103550" | sudo tar -xvzf - -C /usr/lib/jvm/oracle8 --strip-components 1 | |
uname -r | |
- name: Test | |
run: | | |
export TEST_COMMIT=${{ github.sha }} | |
export TEST_CONFIGURATION=glibc/8 | |
export LIBC=glibc | |
export JAVA_TEST_HOME=/usr/lib/jvm/oracle8 | |
export JAVA_HOME=$JAVA_HOME | |
export PATH=$JAVA_HOME/bin:$PATH | |
export BUILD_TYPE=SanitizedDebug | |
./gradlew :ddprof-test:test --info | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports-linux-oracle-jdk-8.zip | |
path: | | |
ddprof-test/hs_err_* | |
ddprof-test/build/reports/tests | |
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log | |
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: x64-oracle-jdk8 | |
path: build/ | |
test-linux-musl: | |
needs: check-for-pr | |
if: needs.check-for-pr.outputs.skip != 'true' | |
strategy: | |
matrix: | |
java_version: [8u362+9, 11.0.18+10, 17.0.6+10, 20.0.1+10] | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
container: | |
image: "bellsoft/liberica-openjdk-alpine-musl:11.0.17" | |
options: --cpus 2 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup system | |
run: apk update && apk add curl moreutils wget hexdump linux-headers bash make g++ clang git cppcheck jq cmake >/dev/null | |
- name: Prepare build JDK | |
run: | | |
wget -nv https://download.bell-sw.com/java/11.0.18+10/bellsoft-jdk11.0.18+10-linux-x64-musl.tar.gz -O jdk.tar.gz | |
tar xzf *.tar.gz | |
find . -type d -name 'jdk*' -maxdepth 1 | xargs -I {} mv {} build_jdk | |
- name: Prepare JDK ${{ matrix.java_version }} | |
run: | | |
wget -nv https://download.bell-sw.com/java/${{ matrix.java_version }}/bellsoft-jdk${{ matrix.java_version }}-linux-x64-musl.tar.gz -O jdk.tar.gz | |
tar xzf *.tar.gz | |
find . -type d -name 'jdk*' -maxdepth 1 | xargs -I {} mv {} test_jdk | |
- name: Test | |
run: | | |
set -x | |
export JAVA_HOME=$(pwd)/build_jdk | |
export PATH=$JAVA_HOME/bin:$PATH | |
export TEST_COMMIT=${{ github.sha }} | |
export TEST_CONFIGURATION=musl/${{ matrix.java_version }} | |
export LIBC=musl | |
export JAVA_TEST_HOME=$(pwd)/test_jdk | |
chmod a+x ddprof-lib/test.sh | |
./gradlew :ddprof-test:test --info | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports-linux-musl-${{ matrix.java_version }}.zip | |
path: | | |
ddprof-test/hs_err_* | |
ddprof-test/build/reports/tests | |
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log | |
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: x64-musl | |
path: build/ | |
test-linux-glibc-zing: | |
needs: check-for-pr | |
if: needs.check-for-pr.outputs.skip != 'true' | |
strategy: | |
matrix: | |
java_version: [ 8, 11, 17 ] | |
runs-on: ubuntu-latest | |
timeout-minutes: 180 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Prepare build JDK | |
uses: actions/setup-java@v3 | |
with: | |
distribution: 'temurin' | |
java-version: "11" | |
- name: Prepare JDK ${{ matrix.java_version }} | |
run: | | |
sudo apt-get -y update && sudo apt-get -y install curl g++-9 gcc-9 | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 100 --slave /usr/bin/g++ g++ /usr/bin/g++-9 | |
sudo update-alternatives --set gcc /usr/bin/gcc-9 | |
set -eux | |
sudo mkdir -p /usr/lib/jvm/zing | |
if [ "${{ matrix.java_version }}" = "8" ]; then | |
# jdk1.8.0_372 | |
curl -L --fail "https://cdn.azul.com/zing-zvm/ZVM23.05.0.0/zing23.05.0.0-2-jdk8.0.372-linux_x64.tar.gz" | sudo tar -xvzf - -C /usr/lib/jvm/zing --strip-components 1 | |
elif [ "${{ matrix.java_version }}" = "11" ]; then | |
# jdk 11.0.19 | |
curl -L --fail "https://cdn.azul.com/zing-zvm/ZVM23.05.0.0/zing23.05.0.0-2-jdk11.0.19-linux_x64.tar.gz" | sudo tar -xvzf - -C /usr/lib/jvm/zing --strip-components 1 | |
elif [ "${{ matrix.java_version }}" = "17" ]; then | |
# jdk 17.0.7 | |
curl -L --fail "https://cdn.azul.com/zing-zvm/ZVM23.05.0.0/zing23.05.0.0-2-jdk17.0.7-linux_x64.tar.gz" | sudo tar -xvzf - -C /usr/lib/jvm/zing --strip-components 1 | |
fi | |
# rename the bundled libstdc++.so to avoid conflicts with the system one | |
sudo mv /usr/lib/jvm/zing/etc/libc++/libstdc++.so.6 /usr/lib/jvm/zing/etc/libc++/libstdc++.so.6.bak | |
- name: Test | |
run: | | |
export TEST_COMMIT=${{ github.sha }} | |
export TEST_CONFIGURATION=glibc/${{ matrix.java_version }} | |
export LIBC=glibc | |
export JAVA_TEST_HOME=/usr/lib/jvm/zing | |
export JAVA_HOME=$JAVA_HOME | |
export PATH=$JAVA_HOME/bin:$PATH | |
export BUILD_TYPE=SanitizedDebug | |
./gradlew :ddprof-test:test --info | |
- name: Upload logs | |
uses: actions/upload-artifact@v3 | |
if: always() | |
with: | |
name: reports-linux-zing-jdk-${{ matrix.java_version }}.zip | |
path: | | |
ddprof-test/hs_err_* | |
ddprof-test/build/reports/tests/test | |
ddprof-lib/src/test/build/Testing/Temporary/LastTest.log | |
ddprof-lib/build/tmp/compileReleaseLinuxCpp/output.txt | |
- uses: actions/upload-artifact@v3 | |
if: success() | |
with: | |
name: x64-glibc-zing-${{ matrix.java_version }} | |
path: build/ | |
gh-release: | |
if: startsWith(github.event.ref, 'refs/heads/release/') | |
runs-on: ubuntu-latest | |
needs: [test-linux-musl, test-linux-glibc, test-linux-glibc-j9] | |
steps: | |
- name: Create Github Release | |
uses: ./.github/workflows/gh_release.yml@gh-release | |
with: | |
release_branch: ${GITHUB_REF_NAME} |