87 lines
2.5 KiB
YAML
87 lines
2.5 KiB
YAML
name: Release
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
|
|
build_release:
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest, macos-10.15, windows-2016]
|
|
include:
|
|
- os: ubuntu-latest
|
|
arch: "linux"
|
|
bazel_args: "--config=toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux"
|
|
- os: macos-10.15
|
|
arch: "macos-x86_64"
|
|
bazel_args: "--config=toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-darwin"
|
|
- os: windows-2016
|
|
arch: "windows"
|
|
bazel_args: ""
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
|
|
- name: Set up JDK
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 8
|
|
|
|
- name: Build
|
|
run: |
|
|
bazelisk build --config=ci --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }} --java_runtime_version=localjdk_${{ matrix.jdk }} ${{ matrix.bazel_args }} //agent/src/main/java/com/code_intelligence/jazzer/replay:Replayer_deploy.jar //:jazzer_release
|
|
cp -L bazel-bin/agent/src/main/java/com/code_intelligence/jazzer/replay/Replayer_deploy.jar replayer.jar
|
|
cp -L bazel-bin/jazzer_release.tar.gz release-${{ matrix.arch }}.tar.gz
|
|
|
|
- name: Upload replayer
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: replayer_${{ matrix.arch }}
|
|
path: replayer.jar
|
|
|
|
- name: Upload release tar
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: jazzer_releases
|
|
path: release-${{ matrix.arch}}.tar.gz
|
|
|
|
merge_replayer_jars:
|
|
runs-on: ubuntu-latest
|
|
needs: build_release
|
|
|
|
steps:
|
|
- name: Download macOS jar
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: replayer_darwin
|
|
path: replayer_darwin
|
|
|
|
- name: Download Linux jar
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: replayer_linux
|
|
path: replayer_linux
|
|
|
|
- name: Download Windows jar
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: replayer_windows
|
|
path: replayer_windows
|
|
|
|
- name: Merge jars
|
|
run: |
|
|
mkdir merged
|
|
unzip -o replayer_darwin/replayer.jar -d merged
|
|
unzip -o replayer_linux/replayer.jar -d merged
|
|
unzip -o replayer_windows/replayer.jar -d merged
|
|
jar cvmf merged/META-INF/MANIFEST.MF replayer.jar -C merged .
|
|
|
|
- name: Upload merged jar
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: replayer
|
|
path: replayer.jar
|
|
|