|
1 | 1 | # `name` value will appear "as is" in the badge.
|
2 | 2 | # See https://docs.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository
|
| 3 | +# yamllint --format github .github/workflows/commit.yaml |
| 4 | +--- |
3 | 5 | name: "build"
|
4 | 6 |
|
5 | 7 | on:
|
6 | 8 | push:
|
7 | 9 | branches:
|
8 |
| - - master |
| 10 | + - master |
9 | 11 | pull_request:
|
10 | 12 | branches:
|
11 |
| - - '**' |
| 13 | + - '**' |
| 14 | + # workflow_dispatch will let us manually trigger the workflow from GitHub actions dashboard. |
| 15 | + # This is important because sometimes the macos build fails due to Docker installation. |
| 16 | + # See https://docs.github.com/en/free-pro-team@latest/actions/managing-workflow-runs/manually-running-a-workflow |
| 17 | + workflow_dispatch: |
12 | 18 |
|
13 | 19 | jobs:
|
14 | 20 | bin:
|
15 | 21 | name: "Build `getenvoy` and `e2e` binaries for use in e2e tests"
|
16 | 22 | runs-on: ubuntu-latest
|
17 | 23 | steps:
|
18 |
| - - name: "Checkout" |
19 |
| - uses: actions/checkout@v2 |
| 24 | + - name: "Checkout" |
| 25 | + uses: actions/checkout@v2 |
20 | 26 |
|
21 |
| - - name: "Install Go" |
22 |
| - uses: actions/setup-go@v2 |
23 |
| - with: |
24 |
| - go-version: '1.16.2' |
| 27 | + - name: "Install Go" |
| 28 | + uses: actions/setup-go@v2 |
| 29 | + with: |
| 30 | + go-version: '1.16.2' |
25 | 31 |
|
26 |
| - - name: "Init on first use" |
27 |
| - run: make init |
| 32 | + - name: "Init on first use" |
| 33 | + run: make init |
28 | 34 |
|
29 |
| - - name: "Build `getenvoy` and `e2e` binaries" |
30 |
| - run: make bin |
| 35 | + - name: "Build `getenvoy` and `e2e` binaries" |
| 36 | + run: make bin |
31 | 37 |
|
32 |
| - - name: "Share `getenvoy` and `e2e` binaries with the downstream jobs" |
33 |
| - uses: actions/upload-artifact@v2 |
34 |
| - with: |
35 |
| - name: bin |
36 |
| - path: build/bin |
| 38 | + - name: "Share `getenvoy` and `e2e` binaries with the downstream jobs" |
| 39 | + uses: actions/upload-artifact@v2 |
| 40 | + with: |
| 41 | + name: bin |
| 42 | + path: build/bin |
37 | 43 |
|
38 | 44 | e2e_linux:
|
39 | 45 | name: "Run e2e tests on Linux"
|
40 | 46 | needs:
|
41 |
| - - bin |
| 47 | + - bin |
42 | 48 | runs-on: ubuntu-latest
|
43 | 49 | steps:
|
44 |
| - - name: "Checkout" |
45 |
| - uses: actions/checkout@v2 |
| 50 | + - name: "Checkout" |
| 51 | + uses: actions/checkout@v2 |
46 | 52 |
|
47 |
| - - name: "Re-use `getenvoy` and `e2e` binaries pre-built by the upstream job" |
48 |
| - uses: actions/download-artifact@v2 |
49 |
| - with: |
50 |
| - name: bin |
51 |
| - path: build/bin |
| 53 | + - name: "Re-use `getenvoy` and `e2e` binaries pre-built by the upstream job" |
| 54 | + uses: actions/download-artifact@v2 |
| 55 | + with: |
| 56 | + name: bin |
| 57 | + path: build/bin |
52 | 58 |
|
53 |
| - - name: "Build language-specific Docker build images" |
54 |
| - run: make builders |
| 59 | + - name: "Build language-specific Docker build images" |
| 60 | + run: make builders |
55 | 61 |
|
56 |
| - - name: "Run e2e tests using `getenvoy` and `e2e` binaries built by the upstream job" |
57 |
| - run: ./ci/e2e/linux/run_tests.sh |
| 62 | + - name: "Run e2e tests using `getenvoy` and `e2e` binaries built by the upstream job" |
| 63 | + run: ./ci/e2e/linux/run_tests.sh |
58 | 64 |
|
59 | 65 | e2e_macos:
|
60 | 66 | name: "Run e2e tests on MacOS"
|
61 | 67 | needs:
|
62 |
| - - bin |
| 68 | + - bin |
63 | 69 | runs-on: macos-latest
|
64 | 70 | steps:
|
65 |
| - - name: "Checkout" |
66 |
| - uses: actions/checkout@v2 |
| 71 | + - name: "Checkout" |
| 72 | + uses: actions/checkout@v2 |
67 | 73 |
|
68 |
| - - name: "Re-use `getenvoy` and `e2e` binaries pre-built by the upstream job" |
69 |
| - uses: actions/download-artifact@v2 |
70 |
| - with: |
71 |
| - name: bin |
72 |
| - path: build/bin |
| 74 | + - name: "Re-use `getenvoy` and `e2e` binaries pre-built by the upstream job" |
| 75 | + uses: actions/download-artifact@v2 |
| 76 | + with: |
| 77 | + name: bin |
| 78 | + path: build/bin |
73 | 79 |
|
74 |
| - - name: "Install 'Docker for Mac' (an older version that can be installed in CI environment)" |
75 |
| - run: ./ci/e2e/macos/install_docker.sh |
| 80 | + - name: "Install 'Docker for Mac' (an older version that can be installed in CI environment)" |
| 81 | + run: ./ci/e2e/macos/install_docker.sh |
76 | 82 |
|
77 |
| - - name: "Build language-specific Docker build images" |
78 |
| - env: |
79 |
| - # don't use `DOCKER_BUILDKIT=1`, `--build-arg BUILDKIT_INLINE_CACHE=1` and `--cache-from` |
80 |
| - # options when using `Docker for Mac` in CI environment |
81 |
| - USE_DOCKER_BUILDKIT_CACHE: 'no' |
82 |
| - run: make builders |
| 83 | + - name: "Build language-specific Docker build images" |
| 84 | + env: |
| 85 | + # don't use `DOCKER_BUILDKIT=1`, `--build-arg BUILDKIT_INLINE_CACHE=1` and `--cache-from` |
| 86 | + # options when using `Docker for Mac` in CI environment |
| 87 | + USE_DOCKER_BUILDKIT_CACHE: 'no' |
| 88 | + run: make builders |
83 | 89 |
|
84 |
| - - name: "Run e2e tests using `getenvoy` and `e2e` binaries built by the upstream job" |
85 |
| - run: ./ci/e2e/macos/run_tests.sh |
| 90 | + - name: "Run e2e tests using `getenvoy` and `e2e` binaries built by the upstream job" |
| 91 | + run: ./ci/e2e/macos/run_tests.sh |
0 commit comments