name: ci-package
on:
schedule:
- cron: '0 2 * * SAT'
workflow_dispatch:
inputs:
version:
description: 'Package version number (blank for cronbuild)'
required: false
default: ''
build:
description: 'Package build number'
required: true
default: '0'
defaults:
run:
shell: bash
jobs:
linux-x86:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Sources
run: |
git fetch --no-tags --depth=1 origin master
# Include Dr. Memory in packages.
# We do shallow clones and assume DrM will update its DR at least once
# every 250 DR commits.
git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
cd drmemory && git submodule update --init --depth 250 && cd ..
- 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
sudo add-apt-repository 'deb [arch=i386] http://us.archive.ubuntu.com/ubuntu focal main'
apt download libunwind8:i386 libunwind-dev:i386 liblzma5:i386
mkdir ../extract
for i in *.deb; do dpkg-deb -x $i ../extract; done
sudo rsync -av ../extract/usr/lib/i386-linux-gnu/ /usr/lib/i386-linux-gnu/
sudo rsync -av ../extract/lib/i386-linux-gnu/ /usr/lib/i386-linux-gnu/
sudo rsync -av ../extract/usr/include/i386-linux-gnu/ /usr/include/
- name: Setup newer cmake
uses: jwlawson/actions-setup-cmake@v1.8
with:
cmake-version: '3.19.7'
- name: Get Version
id: version
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=10.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
if [ "${{ github.event.inputs.build }}" -ne 0 ]; then
export VERSION_NUMBER="${VERSION_NUMBER}-${{ github.event.inputs.build }}"
fi
echo "::set-output name=version_number::${VERSION_NUMBER}"
- name: Build Package
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci
env:
CI_TARGET: package
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
DEPLOY_DOCS: no
DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY: no
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: linux-tarball
path: DynamoRIO-Linux-${{ steps.version.outputs.version_number }}.tar.gz
- 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}}/linux-x86
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: dynamorio-devs@googlegroups.com
from: Github Action package jobs
linux-aarch64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Sources
run: |
git fetch --no-tags --depth=1 origin master
# Include Dr. Memory in packages.
git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
cd drmemory && git submodule update --init --depth 250 && cd ..
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get -y install doxygen vera++ cmake g++-aarch64-linux-gnu
sudo add-apt-repository 'deb [arch=arm64] http://ports.ubuntu.com/ubuntu-ports focal main'
apt download libunwind8:arm64 libunwind-dev:arm64 liblzma5:arm64 \
zlib1g:arm64 zlib1g-dev:arm64 libsnappy1v5:arm64 libsnappy-dev:arm64 \
liblz4-1:arm64 liblz4-dev:arm64
mkdir ../extract
for i in *.deb; do dpkg-deb -x $i ../extract; done
for i in include lib; do sudo rsync -av ../extract/usr/${i}/aarch64-linux-gnu/ /usr/aarch64-linux-gnu/${i}/; done
sudo rsync -av ../extract/usr/include/ /usr/aarch64-linux-gnu/include/
sudo rsync -av ../extract/lib/aarch64-linux-gnu/ /usr/aarch64-linux-gnu/lib/
- name: Get Version
id: version
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=10.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
if [ "${{ github.event.inputs.build }}" -ne 0 ]; then
export VERSION_NUMBER="${VERSION_NUMBER}-${{ github.event.inputs.build }}"
fi
echo "::set-output name=version_number::${VERSION_NUMBER}"
- name: Build Package
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci 64_only
env:
CI_TARGET: package
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY: yes
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}
- name: Upload AArch64
uses: actions/upload-artifact@v2
with:
name: aarch64-tarball
path: DynamoRIO-AArch64-Linux-${{ steps.version.outputs.version_number }}.tar.gz
- 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}}/linux-aarch64
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: dynamorio-devs@googlegroups.com
from: Github Action package jobs
linux-arm:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Sources
run: |
git fetch --no-tags --depth=1 origin master
# Include Dr. Memory in packages.
git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
cd drmemory && git submodule update --init --depth 250 && cd ..
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get -y install doxygen vera++ cmake g++-arm-linux-gnueabihf
sudo add-apt-repository 'deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports focal main'
apt download libunwind8:armhf libunwind-dev:armhf liblzma5:armhf \
zlib1g:armhf zlib1g-dev:armhf libsnappy1v5:armhf libsnappy-dev:armhf \
liblz4-1:armhf liblz4-dev:armhf
mkdir ../extract
for i in *.deb; do dpkg-deb -x $i ../extract; done
for i in include lib; do sudo rsync -av ../extract/usr/${i}/arm-linux-gnueabihf/ /usr/arm-linux-gnueabihf/${i}/; done
sudo rsync -av ../extract/usr/include/ /usr/arm-linux-gnueabihf/include/
sudo rsync -av ../extract/lib/arm-linux-gnueabihf/ /usr/arm-linux-gnueabihf/lib/
- name: Get Version
id: version
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=10.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
if [ "${{ github.event.inputs.build }}" -ne 0 ]; then
export VERSION_NUMBER="${VERSION_NUMBER}-${{ github.event.inputs.build }}"
fi
echo "::set-output name=version_number::${VERSION_NUMBER}"
- name: Build Package
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci 32_only
env:
CI_TARGET: package
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY: yes
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}
- name: Upload ARM
uses: actions/upload-artifact@v2
with:
name: arm-tarball
path: DynamoRIO-ARM-Linux-EABIHF-${{ steps.version.outputs.version_number }}.tar.gz
- 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}}/linux-arm
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: dynamorio-devs@googlegroups.com
from: Github Action package jobs
android-arm:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Sources
run: |
git fetch --no-tags --depth=1 origin master
# Include Dr. Memory in packages.
git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
cd drmemory && git submodule update --init --depth 250 && cd ..
- name: Create Build Environment
run: |
sudo apt-get update
sudo apt-get -y install doxygen vera++ cmake
cd /tmp
wget https://dl.google.com/android/repository/android-ndk-r10e-linux-x86_64.zip
unzip -q android-ndk-r10e-linux-x86_64.zip
export ANDROID_NDK_ROOT=/tmp/android-ndk-r10e
android-ndk-r10e/build/tools/make-standalone-toolchain.sh --arch=arm \
--toolchain=arm-linux-androideabi-4.9 --platform=android-21 \
--install-dir=/tmp/android-gcc-arm-ndk-10e
# Manually force using ld.bfd, setting CMAKE_LINKER does not work.
ln -sf ld.bfd /tmp/android-gcc-arm-ndk-10e/arm-linux-androideabi/bin/ld
ln -sf arm-linux-androideabi-ld.bfd \
/tmp/android-gcc-arm-ndk-10e/bin/arm-linux-androideabi-ld
- name: Get Version
id: version
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=10.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
if [ "${{ github.event.inputs.build }}" -ne 0 ]; then
export VERSION_NUMBER="${VERSION_NUMBER}-${{ github.event.inputs.build }}"
fi
echo "::set-output name=version_number::${VERSION_NUMBER}"
- name: Build Package
working-directory: ${{ github.workspace }}
run: ./suite/runsuite_wrapper.pl automated_ci 32_only
env:
CI_TARGET: package
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
DYNAMORIO_CROSS_AARCHXX_LINUX_ONLY: no
DYNAMORIO_CROSS_ANDROID_ONLY: yes
DYNAMORIO_ANDROID_TOOLCHAIN: /tmp/android-gcc-arm-ndk-10e
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: android-tarball
path: DynamoRIO-ARM-Android-EABI-${{ steps.version.outputs.version_number }}.tar.gz
- 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}}/android-arm
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: dynamorio-devs@googlegroups.com
from: Github Action package jobs
windows:
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Fetch Sources
run: |
git fetch --no-tags --depth=1 origin master
# Include Dr. Memory in packages.
git clone --depth=2 https://github.com/DynamoRIO/drmemory.git drmemory
cd drmemory && git submodule update --init --depth 250 && cd ..
- name: Download Packages
shell: powershell
run: |
md c:\projects\install
(New-Object System.Net.WebClient).DownloadFile("https://github.com/ninja-build/ninja/releases/download/v1.10.2/ninja-win.zip", "c:\projects\install\ninja.zip")
(New-Object System.Net.WebClient).DownloadFile("https://sourceforge.net/projects/doxygen/files/rel-1.8.19/doxygen-1.8.19.windows.x64.bin.zip", "c:\projects\install\doxygen.zip")
- name: Get Version
id: version
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER=10.0.$((`git log -n 1 --format=%ct` / (60*60*24)))
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
fi
if [ "${{ github.event.inputs.build }}" -ne 0 ]; then
export VERSION_NUMBER="${VERSION_NUMBER}-${{ github.event.inputs.build }}"
fi
echo "::set-output name=version_number::${VERSION_NUMBER}"
- name: Build Package
working-directory: ${{ github.workspace }}
shell: cmd
run: |
echo ------ Setting up paths ------
7z x c:\projects\install\ninja.zip -oc:\projects\install\ninja > nul
set PATH=c:\projects\install\ninja;%PATH%
7z x c:\projects\install\doxygen.zip -oc:\projects\install\doxygen > nul
set PATH=c:\projects\install\doxygen;%PATH%
dir "c:\Program Files (x86)\WiX Toolset"*
set PATH=C:\Program Files (x86)\WiX Toolset v3.11\bin;%PATH%
call "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/Auxiliary/Build/vcvars32.bat"
echo ------ Running suite ------
echo PATH is "%PATH%"
echo Running in directory "%CD%"
perl suite/runsuite_wrapper.pl automated_ci use_ninja
env:
CI_TARGET: package
VERSION_NUMBER: ${{ steps.version.outputs.version_number }}
CI_TRIGGER: ${{ github.event_name }}
CI_BRANCH: ${{ github.ref }}
- name: Upload Artifacts
uses: actions/upload-artifact@v2
with:
name: windows-zip
path: DynamoRIO-Windows-${{ steps.version.outputs.version_number }}.zip
- 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}}/windows
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: dynamorio-devs@googlegroups.com
from: Github Action package jobs
create_release:
needs: [linux-x86, linux-aarch64, linux-arm, android-arm, windows]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
submodules: true
- name: Get Version
id: version
run: |
if test -z "${{ github.event.inputs.version }}"; then
export VERSION_NUMBER="10.0.$((`git log -n 1 --format=%ct` / (60*60*24)))"
export PREFIX="cronbuild-"
else
export VERSION_NUMBER=${{ github.event.inputs.version }}
export PREFIX="release_"
fi
if [ "${{ github.event.inputs.build }}" -ne 0 ]; then
export VERSION_NUMBER="${VERSION_NUMBER}-${{ github.event.inputs.build }}"
fi
echo "::set-output name=version_number::${VERSION_NUMBER}"
echo "::set-output name=version_string::${PREFIX}${VERSION_NUMBER}"
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.version.outputs.version_string }}
release_name: ${{ steps.version.outputs.version_string }}
body: |
Auto-generated periodic build.
draft: false
prerelease: false
- name: Download Linux
uses: actions/download-artifact@v2
with:
name: linux-tarball
- name: Upload Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DynamoRIO-Linux-${{ steps.version.outputs.version_number }}.tar.gz
asset_name: DynamoRIO-Linux-${{ steps.version.outputs.version_number }}.tar.gz
asset_content_type: application/x-gzip
- name: Download AArch64
uses: actions/download-artifact@v2
with:
name: aarch64-tarball
- name: Upload AArch64
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DynamoRIO-AArch64-Linux-${{ steps.version.outputs.version_number }}.tar.gz
asset_name: DynamoRIO-AArch64-Linux-${{ steps.version.outputs.version_number }}.tar.gz
asset_content_type: application/x-gzip
- name: Download ARM
uses: actions/download-artifact@v2
with:
name: arm-tarball
- name: Upload ARM
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DynamoRIO-ARM-Linux-EABIHF-${{ steps.version.outputs.version_number }}.tar.gz
asset_name: DynamoRIO-ARM-Linux-EABIHF-${{ steps.version.outputs.version_number }}.tar.gz
asset_content_type: application/x-gzip
- name: Download Android
uses: actions/download-artifact@v2
with:
name: android-tarball
- name: Upload Android
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DynamoRIO-ARM-Android-EABI-${{ steps.version.outputs.version_number }}.tar.gz
asset_name: DynamoRIO-ARM-Android-EABI-${{ steps.version.outputs.version_number }}.tar.gz
asset_content_type: application/x-gzip
- name: Download Windows
uses: actions/download-artifact@v2
with:
name: windows-zip
- name: Upload Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: DynamoRIO-Windows-${{ steps.version.outputs.version_number }}.zip
asset_name: DynamoRIO-Windows-${{ steps.version.outputs.version_number }}.zip
asset_content_type: application/zip
- 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}}/create_release
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: dynamorio-devs@googlegroups.com
from: Github Action package jobs