Skip to content

Commit

Permalink
DIRTY: workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ziyao233 committed Jan 18, 2025
1 parent 2dfd7cb commit d14e94c
Show file tree
Hide file tree
Showing 2 changed files with 207 additions and 9 deletions.
203 changes: 197 additions & 6 deletions .github/workflows/ci-x86.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,12 +98,6 @@ jobs:
sudo rsync -av ../extract/usr/include/i386-linux-gnu/ /usr/include/
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
# Use a newer cmake to avoid 32-bit toolchain problems (i#4830).
- name: Setup newer cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.19.7'

- name: Run Suite
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci 32_only
Expand Down Expand Up @@ -333,3 +327,200 @@ jobs:
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}}
to: [email protected]
from: Github Action CI

# 64-bit Linux build with gcc and run tests.
x86-64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' }}

- run: git fetch --no-tags --depth=1 origin master

# Install multilib for non-cross-compiling Linux build.
- name: Create Build Environment
run: |
sudo apt update
sudo apt-get -y install doxygen vera++ zlib1g-dev libsnappy-dev \
liblz4-dev g++-multilib libunwind-dev
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
# Use a newer cmake to avoid 32-bit toolchain problems (i#4830).
- name: Setup newer cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.19.7'

- name: Run Suite
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci 64_only
env:
DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY: no
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}

- name: Send failure mail to dynamorio-devs
if: failure() && github.ref == 'refs/heads/master'
uses: dawidd6/action-send-mail@v2
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}}
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}}
subject: |
[${{github.repository}}] ${{github.workflow}} FAILED
on ${{github.event_name}} at ${{github.ref}}
body: |
Github Actions CI workflow run FAILED!
Workflow: ${{github.workflow}}/x86-64
Repository: ${{github.repository}}
Branch ref: ${{github.ref}}
SHA: ${{github.sha}}
Triggering actor: ${{github.actor}}
Triggering event: ${{github.event_name}}
Run Id: ${{github.run_id}}
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}}
to: [email protected]
from: Github Action CI

# Ubuntu22 64-bit Linux build with gcc and run tests.
# XXX: A matrix could combine this with the 20.04 but our auto-cancel
# step cancels the 2nd job so we need to solve that first.
x86-64-ubuntu22:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: true

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' }}

- run: git fetch --no-tags --depth=1 origin master

# Install multilib for non-cross-compiling Linux build.
- name: Create Build Environment
run: |
sudo apt update
sudo apt-get -y install doxygen vera++ zlib1g-dev libsnappy-dev \
liblz4-dev g++-multilib libunwind-dev
echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope
# Use a newer cmake to avoid 32-bit toolchain problems (i#4830).
- name: Setup newer cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.19.7'

- name: Run Suite
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci 64_only
env:
DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY: no
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}

- name: Send failure mail to dynamorio-devs
if: failure() && github.ref == 'refs/heads/master'
uses: dawidd6/action-send-mail@v2
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}}
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}}
subject: |
[${{github.repository}}] ${{github.workflow}} FAILED
on ${{github.event_name}} at ${{github.ref}}
body: |
Github Actions CI workflow run FAILED!
Workflow: ${{github.workflow}}/x86-64-ubuntu22
Repository: ${{github.repository}}
Branch ref: ${{github.ref}}
SHA: ${{github.sha}}
Triggering actor: ${{github.actor}}
Triggering event: ${{github.event_name}}
Run Id: ${{github.run_id}}
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}}
to: [email protected]
from: Github Action CI

# 64-bit Linux build with gcc and musl. Testsuite disabled since there're
# failing tests.
x86-64-alpine3.21:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
path: ${{ github.workspace }}/DynamoRIO

# Cancel any prior runs for a PR (but do not cancel master branch runs).
- uses: n1hility/cancel-previous-runs@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
if: ${{ github.event_name == 'pull_request' }}

- run: git fetch --no-tags --depth=1 origin master
working-directory: ${{ github.

# Create an Alpine Linux 3.21.2 chroot environment for building
- name: Create Build Environment
run: |
mkdir alpine-root && cd alpine-root
curl -L https://dl-cdn.alpinelinux.org/v3.21/releases/x86_64/alpine-minirootfs-3.21.0-x86_64.tar.gz | \
tar xzv
sudo mount -o bind /dev/ dev
sudo mount -t proc proc proc
sudo mount -t sysfs sys sys
sudo mount -o $${{ github.workspace }}/DynamoRIO root
sudo chroot . bin/sh
apk upgrade -U
apk install alpine-sdk doxygen zlib-dev lz4-dev libunwind-dev xz-dev \
bash cmake
- name: Run Suite
working-directory: ${{ github.workspace }}
run: |
sudo --preserve-env=CI_TRIGGER,CI_BRANCH,DYNAMORIO_MUSL \
chroot alpine-root sh -c 'cd &&
./suite/runsuite_wrapper.pl automated_ci 32_only'
env:
DYNAMORIO_MUSL: yes
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}

- name: Send failure mail to dynamorio-devs
if: failure() && github.ref == 'refs/heads/master'
uses: dawidd6/action-send-mail@v2
with:
server_address: smtp.gmail.com
server_port: 465
username: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_USERNAME}}
password: ${{secrets.DYNAMORIO_NOTIFICATION_EMAIL_PASSWORD}}
subject: |
[${{github.repository}}] ${{github.workflow}} FAILED
on ${{github.event_name}} at ${{github.ref}}
body: |
Github Actions CI workflow run FAILED!
Workflow: ${{github.workflow}}/x86-32-ubuntu22
Repository: ${{github.repository}}
Branch ref: ${{github.ref}}
SHA: ${{github.sha}}
Triggering actor: ${{github.actor}}
Triggering event: ${{github.event_name}}
Run Id: ${{github.run_id}}
See more details on github.com/DynamoRIO/dynamorio/actions/runs/${{github.run_id}}
to: [email protected]
from: Github Action CI
13 changes: 10 additions & 3 deletions suite/runsuite.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,16 @@ set(build_tests "BUILD_TESTS:BOOL=ON")
if (arg_automated_ci)
# XXX i#1801, i#1962: under clang we have several failing tests. Until those are
# fixed, our CI clang suite only builds and does not run tests.
if (UNIX AND NOT APPLE AND "$ENV{DYNAMORIO_CLANG}" MATCHES "yes")
set(run_tests OFF)
message("Detected a CI clang suite: disabling running of tests")
# XXX i#1973: our musl port pass only half of the tests. Enable tests in CI
# when it's really ready.
if (UNIX AND NOT APPLE)
if ("$ENV{DYNAMORIO_CLANG}" MATCHES "yes")
set(run_tests OFF)
message("Detected a CI clang suite: disabling running of tests")
elseif ("$ENV{DYNAMORIO_MUSL}" MATCHES "yes")
set(run_tests OFF)
message("Detected a CI musl suite: disabling running of tests")
endif ()
endif ()
if ("$ENV{CI_TARGET}" STREQUAL "package")
# We don't want flaky tests to derail package deployment. We've already run
Expand Down

0 comments on commit d14e94c

Please sign in to comment.