@@ -3,6 +3,18 @@ name: ci
3
3
on :
4
4
push :
5
5
branches : ["docker-build"]
6
+ tags :
7
+ - " v*"
8
+ workflow_dispatch :
9
+ inputs :
10
+ revision :
11
+ description : " Tag or revision to build binaries for"
12
+ type : string
13
+ required : true
14
+ create_release :
15
+ description : " Should publish the binary or not"
16
+ required : true
17
+ default : " false"
6
18
7
19
env :
8
20
REGISTRY_IMAGE : sourcegraph/scip-clang
15
27
include :
16
28
- os : ubuntu-22.04-32core-graph-team-amd64
17
29
platform : linux/amd64
30
+ binary_name : scip-clang-x86_64-linux
18
31
- os : ubuntu-22.04-32core-graph-team-arm64
19
32
platform : linux/arm64
33
+ binary_name : scip-clang-arm64-linux
34
+ runs-on : ${{ matrix.os }}
35
+ steps :
36
+ - uses : bazel-contrib/setup-bazel@0.14.0
37
+ with :
38
+ bazelisk-cache : true
39
+ disk-cache : ${{ github.workflow }}
40
+ repository-cache : true
41
+
42
+ - name : Build binary
43
+ run : bazel build //indexer:scip-clang --config release
44
+
45
+ - name : Upload artifacts
46
+ uses : actions/upload-artifact@v4
47
+ with :
48
+ path : bazel-bin/indexer/scip-clang
49
+ name : ${{ matrix.binary_name }}
50
+ if-no-files-found : error
51
+
52
+ build-docker :
53
+ needs : [build]
54
+ strategy :
55
+ fail-fast : false
56
+ matrix :
57
+ include :
58
+ - os : ubuntu-22.04
59
+ platform : linux/amd64
60
+ binary_name : scip-clang-x86_64-linux
61
+ - os : ubuntu-22.04-arm
62
+ platform : linux/arm64
63
+ binary_name : scip-clang-arm64-linux
20
64
runs-on : ${{ matrix.os }}
21
65
steps :
22
66
- name : Prepare
46
90
- name : Set up Docker Buildx
47
91
uses : docker/setup-buildx-action@v3
48
92
93
+ - name : Download pre-built binary
94
+ uses : actions/download-artifact@v4
95
+ with :
96
+ name : ${{ matrix.binary_name }}
97
+ path : /tmp/binary
98
+
99
+ - run : cp /tmp/binary/${{ matrix.binary_name }}/scip-clang ./scip-clang
100
+
49
101
- name : Build and push by digest
50
102
id : build
51
103
uses : docker/build-push-action@v6
0 commit comments