forked from CodeIntelligenceTesting/jazzer
-
Notifications
You must be signed in to change notification settings - Fork 0
128 lines (108 loc) · 4.09 KB
/
release.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
name: Release
on:
workflow_dispatch:
jobs:
build_release:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Keep arch names in sync with replayer and junit 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 }} //driver/src/main/java/com/code_intelligence/jazzer/replay:Replayer_deploy.jar //deploy:junit //:jazzer_release
cp -L $(bazel cquery --output=files //driver/src/main/java/com/code_intelligence/jazzer/replay:Replayer_deploy.jar) replayer.jar
cp -L $(bazel cquery --output=files //deploy:junit) junit.jar
cp -L $(bazel cquery --output=files //:jazzer_release) release-${{ matrix.arch }}.tar.gz
- name: Upload replayer
uses: actions/upload-artifact@v2
with:
name: replayer_${{ matrix.arch }}
path: replayer.jar
- name: Upload JUnit integration
uses: actions/upload-artifact@v2
with:
name: junit_${{ matrix.arch }}
path: junit.jar
- name: Upload release tar
uses: actions/upload-artifact@v2
with:
name: jazzer_releases
path: release-${{ matrix.arch}}.tar.gz
merge_jars:
runs-on: ubuntu-latest
needs: build_release
steps:
- name: Download macOS x86_64 replayer jar
uses: actions/download-artifact@v2
with:
name: replayer_macos-x86_64
path: replayer_macos-x86_64
- name: Download macOS x86_64 JUnit jar
uses: actions/download-artifact@v2
with:
name: junit_macos-x86_64
path: junit_macos-x86_64
- name: Download Linux replayer jar
uses: actions/download-artifact@v2
with:
name: replayer_linux
path: replayer_linux
- name: Download Linux JUnit jar
uses: actions/download-artifact@v2
with:
name: junit_linux
path: junit_linux
- name: Download Windows replayer jar
uses: actions/download-artifact@v2
with:
name: replayer_windows
path: replayer_windows
- name: Download Windows JUnit jar
uses: actions/download-artifact@v2
with:
name: junit_windows
path: junit_windows
- name: Merge replayer jars
run: |
mkdir replayer_merged
unzip -o replayer_macos-x86_64/replayer.jar -d replayer_merged
unzip -o replayer_linux/replayer.jar -d replayer_merged
unzip -o replayer_windows/replayer.jar -d replayer_merged
jar cvmf replayer_merged/META-INF/MANIFEST.MF replayer.jar -C replayer_merged .
- name: Merge JUnit jars
run: |
mkdir junit_merged
unzip -o junit_macos-x86_64/junit.jar -d junit_merged
unzip -o junit_linux/junit.jar -d junit_merged
unzip -o junit_windows/junit.jar -d junit_merged
jar cvmf junit_merged/META-INF/MANIFEST.MF junit.jar -C junit_merged .
- name: Upload merged replayer jar
uses: actions/upload-artifact@v2
with:
name: replayer
path: replayer.jar
- name: Upload merged JUnit jar
uses: actions/upload-artifact@v2
with:
name: junit
path: junit.jar