Skip to content

Commit 0644b03

Browse files
authored
Added CI (#2)
1 parent 9fe4623 commit 0644b03

File tree

4 files changed

+56
-3
lines changed

4 files changed

+56
-3
lines changed

.github/workflows/main.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- "**"
7+
8+
concurrency:
9+
group: ${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/cache@v3
17+
with:
18+
path: |
19+
~/.cache/bazelisk
20+
~/.cache/bazel-disk-cache
21+
key: ${{runner.os}}-bazel-cache
22+
- uses: actions/checkout@v3
23+
- run: bazel build --config=ci ...
24+
check-dist:
25+
runs-on: ubuntu-latest
26+
steps:
27+
- uses: actions/cache@v3
28+
with:
29+
path: |
30+
~/.cache/bazelisk
31+
~/.cache/bazel-disk-cache
32+
key: ${{runner.os}}-bazel-cache
33+
- uses: actions/checkout@v3
34+
- run: ./CheckDist.sh

BUILD.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ bzlws_copy(
1616
],
1717
out = "dist/include/{FILEPATH}",
1818
force = True,
19+
strip_filepath_prefix = "external/ecsact_runtime",
1920
)
2021

2122
bzlws_copy(

CheckDist.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
bazel build --config=ci //:copy_dist_bin //:copy_dist_include //:copy_dist_codegen_plugins
6+
7+
bazel run --config=ci //:copy_dist_bin
8+
bazel run --config=ci //:copy_dist_include
9+
bazel run --config=ci //:copy_dist_codegen_plugins
10+
11+
find dist -type f
12+
13+
echo
14+
15+
[ ! -d "dist/include/ecsact" ] && echo "Missing ecsact include directory" && exit 1
16+
[ ! -f "dist/bin/ecsact" ] && echo "Missing ecsact CLI" && exit 1
17+
18+
exit 0

WORKSPACE.bazel

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ http_archive(
6868

6969
http_archive(
7070
name = "bzlws",
71-
sha256 = "9f52b3f339fb42e5a663b379eda56723fafb27c0fb3113152ee3a9229b059080",
72-
strip_prefix = "bzlws-4042efa29a0359cf13f1b64e0bcd560c2d1dc4c2",
73-
url = "https://github.com/zaucy/bzlws/archive/4042efa29a0359cf13f1b64e0bcd560c2d1dc4c2.zip",
71+
sha256 = "93e6cec29581070fe4455a2ad6c81d4b7ee8ca1b76c2c340883100ef2686c8c7",
72+
strip_prefix = "bzlws-b12ad162a63fc368785a217cd62c7afb0c9107f8",
73+
url = "https://github.com/zaucy/bzlws/archive/b12ad162a63fc368785a217cd62c7afb0c9107f8.zip",
7474
)
7575

7676
load("@bzlws//:repo.bzl", "bzlws_deps")

0 commit comments

Comments
 (0)