diff options
Diffstat (limited to '.github/workflows/build-replayer.yml')
-rw-r--r-- | .github/workflows/build-replayer.yml | 76 |
1 files changed, 76 insertions, 0 deletions
diff --git a/.github/workflows/build-replayer.yml b/.github/workflows/build-replayer.yml new file mode 100644 index 00000000..aa617416 --- /dev/null +++ b/.github/workflows/build-replayer.yml @@ -0,0 +1,76 @@ +name: Release replayer + +on: + workflow_dispatch: + +jobs: + + build_replayer: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, macos-10.15] + include: + - os: ubuntu-latest + arch: "linux" + cache: "/home/runner/.cache/bazel-disk" + - os: macos-10.15 + arch: "darwin" + cache: "/private/var/tmp/bazel-disk" + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK + uses: actions/setup-java@v1 + with: + java-version: 8 + + - name: Mount Bazel disk cache + uses: actions/cache@v2 + with: + path: ${{ matrix.cache }} + key: bazel-disk-cache-${{ matrix.arch }}-8 + + - name: Build + run: | + bazelisk build --config=ci --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }} --disk_cache=${{ matrix.cache }} --java_runtime_version=localjdk_${{ matrix.jdk }} //agent/src/main/java/com/code_intelligence/jazzer/replay:Replayer_deploy.jar + cp -L bazel-bin/agent/src/main/java/com/code_intelligence/jazzer/replay/Replayer_deploy.jar replayer.jar + + - name: Upload test logs + if: always() + uses: actions/upload-artifact@v2 + with: + name: replayer_${{ matrix.arch }}.jar + path: replayer.jar + + merge_jars: + runs-on: ubuntu-latest + needs: build_replayer + + steps: + - name: Download macOS jar + uses: actions/download-artifact@v2 + with: + name: replayer_darwin.jar + path: replayer_darwin + + - name: Download Linux jar + uses: actions/download-artifact@v2 + with: + name: replayer_linux.jar + path: replayer_linux + + - name: Merge jars + run: | + mkdir merged + unzip -o replayer_darwin/replayer.jar -d merged + unzip -o replayer_linux/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.jar + path: replayer.jar + |