blob: 2cbfbaaeb08ded57db12ae7c2a59b4e3db59a86b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
name: Release
on:
workflow_dispatch:
jobs:
build_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Keep arch names in sync with replayer download and merge
os: [ubuntu-latest, macos-10.15, windows-2019]
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 --xcode_version_config=//.github:host_xcodes"
- os: windows-2019
arch: "windows"
bazel_args: ""
steps:
- uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
- name: Set Build Buddy config
run: .github/scripts/echoBuildBuddyConfig.sh ${{ secrets.BUILDBUDDY_API_KEY }} >> $GITHUB_ENV
shell: bash
- name: Build
run: |
bazelisk build ${{env.BUILD_BUDDY_CONFIG}} --java_runtime_version=local_jdk_8 ${{ 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_macos-x86_64
path: replayer_macos-x86_64
- 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_macos-x86_64/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
|