forked from jflex-de/jflex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.cirrus.yml
80 lines (73 loc) · 2.81 KB
/
.cirrus.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
# Copyright 2018-2020 Google LLC.
# SPDX-License-Identifier: Apache-2.0
buildtools_cache:
folder: buildtools
container:
image: l.gcr.io/google/bazel:3.5.0
cpu: 4
memory: 8GB
bazel_build_and_test_task:
name: Bazel build and test
start_bazel_script:
- bazel --bazelrc=.ci.bazelrc info --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST release
test_jflex_script:
- bazel --bazelrc=.ci.bazelrc test --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST //jflex/...
regression_tests_script:
- bazel --bazelrc=.ci.bazelrc test --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST //javatests/de/jflex/testcase/...
build_all_script:
- bazel --bazelrc=.ci.bazelrc build --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST //...
test_all_script:
- bazel --bazelrc=.ci.bazelrc test --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST //...
build_artifact_script:
- bazel --bazelrc=.ci.bazelrc build --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST jflex/jflex_bin_deploy.jar
check_aggregated_sources_script:
- bazel --bazelrc=.ci.bazelrc build --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST //jflex:jflex_bin_deploy-src.jar //jflex:resources
- mkdir -p jflex_bin_deploy ; cd jflex_bin_deploy
- cp ../scripts/compile-aggregated-java-sources.sh compile.sh
- jar -xf ../bazel-bin/jflex/jflex_bin_deploy-src.jar
- jar -xf ../bazel-bin/jflex/libresources.jar
- ./compile.sh
- ls jflex/Main.class
binary_artifacts:
path: "bazel-out/*/bin/jflex/jflex_bin_deploy.jar"
type: application/java-archive
manual_artifacts:
path: "bazel-out/*/bin/docs/manual.pdf"
type: application/pdf
always:
junit_artifacts:
path: "bazel-out/*/testlogs/**/test.xml"
type: text/xml
format: junit
environment:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
main_branch_task:
name: Measure code coverage & deploy aggregated sources
measure_coverage_script:
- bazel --bazelrc=.ci.bazelrc coverage --combined_report=none --remote_http_cache=http://$CIRRUS_HTTP_CACHE_HOST //javatests/... //jflex/...
send_coverage_report_script:
- scripts/send-code-coverage.sh
deploy_aggregated_sources_script:
- scripts/prepare-deploy-source-code.sh
only_if: $CIRRUS_BRANCH == $CIRRUS_DEFAULT_BRANCH || $CIRRUS_BRANCH == 'cirrus'
environment:
CODACY_PROJECT_TOKEN: ENCRYPTED[2fac1c4b7834a7f75477aa710279eaaa65db5999d9d0219940eb1e9679a38073c9fd99f240904ab318f95aab5eea5af9]
codestyle_task:
name: Check code style
container:
image: openjdk:11-jdk
cpu: 2
memory: 4GB
check_java_format_script: scripts/test-java-format.sh
check_bzl_format_script: scripts/test-bzl-format.sh
steps:
- restore_cache:
keys:
- source-v1-{{ .Branch }}-{{ .Revision }}
- source-v1-{{ .Branch }}-
- source-v1--
- checkout
- git_cache:
key: source-v1-{{ .Branch }}-{{ .Revision }}
paths:
- ".git"