Skip to content

Commit c8178fc

Browse files
committed
Synchronize the github actions worksflows with v3.10.x
1 parent cb6915a commit c8178fc

9 files changed

+300
-4
lines changed

.github/workflows/oci.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
7979
- name: Build generic unix package
8080
run: |
81-
sed -i"_orig" '/APP_VERSION/ s/3.9.0/${{ github.sha }}/' rabbitmq.bzl
81+
sed -i"_orig" -E '/APP_VERSION/ s/3\.[0-9]+\.[0-9]+/${{ github.sha }}/' rabbitmq.bzl
8282
bazelisk build :package-generic-unix
8383
8484
- name: Resolve generic unix package path
Lines changed: 111 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,111 @@
1+
name: Gather Bazel Execution Logs
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
target:
6+
description: 'A bazel label representing the test target'
7+
required: true
8+
default: '//deps/rabbit:rabbit_stream_queue_SUITE'
9+
jobs:
10+
run-a:
11+
name: Run A
12+
runs-on: ubuntu-latest
13+
strategy:
14+
matrix:
15+
erlang_version:
16+
- "24"
17+
include:
18+
- erlang_version: "24"
19+
cache_name: ci-bazel-cache-analysis
20+
timeout-minutes: 120
21+
steps:
22+
- name: CHECKOUT REPOSITORY
23+
uses: actions/checkout@v3
24+
- name: CONFIGURE BAZEL
25+
run: |
26+
cat << EOF >> user.bazelrc
27+
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
28+
29+
build:buildbuddy --build_metadata=ROLE=CI
30+
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-${{ matrix.cache_name }}
31+
EOF
32+
- name: RUN TESTS
33+
run: |
34+
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
35+
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
36+
bazelisk test ${{ github.event.inputs.target }} \
37+
--config=rbe-${{ matrix.erlang_version }} \
38+
--execution_log_binary_file=/tmp/exec.log
39+
- name: SAVE EXECUTION LOG BINARY
40+
uses: actions/upload-artifact@v2-preview
41+
with:
42+
name: execution-log-binary-A
43+
path: /tmp/exec.log
44+
run-b:
45+
name: Run B
46+
needs: run-a
47+
runs-on: ubuntu-latest
48+
strategy:
49+
matrix:
50+
erlang_version:
51+
- "24"
52+
include:
53+
- erlang_version: "24"
54+
cache_name: ci-bazel-cache-analysis
55+
timeout-minutes: 120
56+
steps:
57+
- name: CHECKOUT REPOSITORY
58+
uses: actions/checkout@v3
59+
- name: CONFIGURE BAZEL
60+
run: |
61+
cat << EOF >> user.bazelrc
62+
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
63+
64+
build:buildbuddy --build_metadata=ROLE=CI
65+
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-${{ matrix.cache_name }}
66+
EOF
67+
- name: RUN TESTS
68+
run: |
69+
sudo sysctl -w net.ipv4.tcp_keepalive_time=60
70+
sudo ethtool -K eth0 tso off gso off gro off tx off rx off lro off
71+
bazelisk test ${{ github.event.inputs.target }} \
72+
--config=rbe-${{ matrix.erlang_version }} \
73+
--execution_log_binary_file=/tmp/exec.log
74+
- name: SAVE EXECUTION LOG BINARY
75+
uses: actions/upload-artifact@v2-preview
76+
with:
77+
name: execution-log-binary-B
78+
path: /tmp/exec.log
79+
parse-logs:
80+
name: Parse Logs
81+
needs: [run-a, run-b]
82+
runs-on: ubuntu-latest
83+
steps:
84+
- name: CHECKOUT BAZEL
85+
uses: actions/checkout@v3
86+
with:
87+
repository: bazelbuild/bazel
88+
path: bazel
89+
- name: MOUNT BAZEL CACHE
90+
uses: actions/[email protected]
91+
with:
92+
path: "/home/runner/.cache/bazel"
93+
key: bazel
94+
- name: BUILD EXECLOG PARSER
95+
working-directory: bazel
96+
run: |
97+
bazelisk build src/tools/execlog:parser
98+
- name: FETCH LOGS
99+
uses: actions/download-artifact@v2
100+
- name: PARSE LOGS
101+
run: |
102+
bazel/bazel-bin/src/tools/execlog/parser \
103+
--log_path=./execution-log-binary-A/exec.log \
104+
--log_path=./execution-log-binary-B/exec.log \
105+
--output_path=/tmp/execution-log-binary-A.log.txt \
106+
--output_path=/tmp/execution-log-binary-B.log.txt
107+
- name: SAVE PARSED LOGS
108+
uses: actions/upload-artifact@v2-preview
109+
with:
110+
name: parsed-logs
111+
path: /tmp/execution-log-binary-*.log.txt

.github/workflows/rabbitmq_peer_discovery_aws.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
name: Peer Discovery AWS Integration Test
22
on:
33
push:
4+
branches:
5+
- master
6+
- v3.10.x
7+
- v3.9.x
8+
- v3.8.x
49
paths:
510
- 'deps/rabbitmq_peer_discovery_aws/**'
611
- .github/workflows/rabbitmq_peer_discovery_aws.yaml
12+
workflow_dispatch:
713
jobs:
814
peer-discovery-aws-integration-test:
915
name: Integration Test

.github/workflows/test-erlang-git.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
build:buildbuddy --color=yes
4545
build:buildbuddy --disk_cache=
4646
47+
build:rbe-git --config=rbe
4748
build:rbe-git --crosstool_top=@buildbuddy_toolchain//:toolchain
4849
build:rbe-git --extra_toolchains=@buildbuddy_toolchain//:cc_toolchain
4950

.github/workflows/test-windows.yaml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Test Windows
2+
on:
3+
schedule:
4+
- cron: '0 2 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
test:
8+
name: Test Windows
9+
runs-on: windows-latest
10+
strategy:
11+
fail-fast: false
12+
matrix:
13+
erlang_version:
14+
#! - "23"
15+
- "24"
16+
timeout-minutes: 120
17+
steps:
18+
- name: CHECKOUT REPOSITORY
19+
uses: actions/checkout@v3
20+
- name: CONFIGURE ERLANG
21+
uses: erlef/[email protected]
22+
with:
23+
otp-version: ${{ matrix.erlang_version }}
24+
elixir-version: 1.12.3
25+
#! - name: MOUNT BAZEL CACHE
26+
#! uses: actions/cache@v1
27+
#! with:
28+
#! path: "/home/runner/repo-cache/"
29+
#! key: repo-cache
30+
- name: CONFIGURE BAZEL
31+
shell: bash
32+
run: |
33+
ERL_PATH="$(which erl)"
34+
IEX_PATH="$(which iex)"
35+
cat << EOF >> user.bazelrc
36+
startup --output_user_root=C:/tmp
37+
startup --windows_enable_symlinks
38+
build --enable_runfiles
39+
40+
build:buildbuddy --remote_header=x-buildbuddy-api-key=${{ secrets.BUILDBUDDY_API_KEY }}
41+
42+
build:buildbuddy --build_metadata=ROLE=CI
43+
build:buildbuddy --build_metadata=VISIBILITY=PUBLIC
44+
build:buildbuddy --remote_instance_name=buildbuddy-io/buildbuddy/ci-windows-${{ matrix.erlang_version }}
45+
# build:buildbuddy --repository_cache=/home/runner/repo-cache/
46+
build:buildbuddy --color=yes
47+
build:buildbuddy --disk_cache=
48+
49+
build --@rules_erlang//:erlang_version=${{ matrix.erlang_version }}
50+
build --@rules_erlang//:erlang_home="${ERL_PATH/\/bin\/erl/}"
51+
build --//:elixir_home="${IEX_PATH/\/bin\/iex/}"
52+
EOF
53+
54+
bazelisk info release
55+
- name: RUN TESTS
56+
shell: cmd
57+
run: |
58+
bazelisk test //... ^
59+
--config=buildbuddy ^
60+
--test_tag_filters=-aws,-bats,-starts-background-broker ^
61+
--build_tests_only ^
62+
--verbose_failures

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,8 @@ jobs:
5656
build:buildbuddy --color=yes
5757
build:buildbuddy --disk_cache=
5858
EOF
59+
60+
bazelisk info release
5961
#! - name: Setup tmate session
6062
#! uses: mxschmitt/action-tmate@v3
6163
- name: RUN TESTS
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Update OTP Versions for OCI Workflow
2+
on:
3+
schedule:
4+
- cron: '0 3 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
update-rbe-images:
8+
name: Update OTP Versions
9+
runs-on: ubuntu-latest
10+
strategy:
11+
max-parallel: 1
12+
matrix:
13+
erlang_version:
14+
- "24.3"
15+
include:
16+
- erlang_version: "24.3"
17+
image_tag_suffix: 'otp-max'
18+
timeout-minutes: 10
19+
steps:
20+
- name: CHECKOUT REPOSITORY
21+
uses: actions/checkout@v3
22+
- name: SKIP IF THE PR ALREADY EXISTS
23+
id: check-for-branch
24+
run: |
25+
set +e
26+
git ls-remote --exit-code --heads origin bump-otp-for-oci
27+
echo "::set-output name=c::$?"
28+
- name: DETERMINE LATEST PATCH & SHA
29+
if: steps.check-for-branch.outputs.c != 0
30+
id: fetch-version
31+
run: |
32+
TAG_NAME=$(curl -s GET https://api.github.com/repos/erlang/otp/tags \
33+
| jq -r 'map(select(.name | contains("OTP-${{ matrix.erlang_version }}"))) | first | .name')
34+
35+
wget --continue --quiet --output-document="/tmp/OTP.tar.gz" "https://github.com/erlang/otp/archive/${TAG_NAME}.tar.gz" && \
36+
SHA=$(shasum -a 256 "/tmp/OTP.tar.gz" | awk '{print $1}')
37+
38+
echo "::set-output name=VERSION::${TAG_NAME#OTP-}"
39+
echo "::set-output name=SHA::${SHA}"
40+
- name: MODIFY VERSION FILE
41+
if: steps.check-for-branch.outputs.c != 0
42+
run: |
43+
echo "Updating packaging/docker-image/${{ matrix.image_tag_suffix }}.yaml with:"
44+
echo " otp -> ${{ steps.fetch-version.outputs.VERSION }}"
45+
echo " otp_sha256 -> ${{ steps.fetch-version.outputs.SHA }}"
46+
47+
FILE=packaging/docker-image/otp-versions/${{ matrix.image_tag_suffix }}.yaml
48+
sed -i "s/otp: .*/otp: '${{ steps.fetch-version.outputs.VERSION }}'/" $FILE
49+
sed -i "s/otp_sha256: .*/otp_sha256: ${{ steps.fetch-version.outputs.SHA }}/" $FILE
50+
51+
set -x
52+
git diff
53+
- name: CREATE PULL REQUEST
54+
if: steps.check-for-branch.outputs.c != 0
55+
uses: peter-evans/[email protected]
56+
with:
57+
token: ${{ secrets.REPO_SCOPED_TOKEN }}
58+
committer: GitHub <[email protected]>
59+
author: GitHub <[email protected]>
60+
title: Adopt otp ${{ steps.fetch-version.outputs.VERSION }} for OCI workflow
61+
commit-message: |
62+
Adopt otp ${{ steps.fetch-version.outputs.VERSION }} for OCI workflow
63+
labels: |
64+
backport-v3.10.x
65+
backport-v3.9.x
66+
backport-v3.8.x
67+
branch: bump-otp-for-oci
68+
delete-branch: true

.github/workflows/update-rbe-images.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,11 +12,11 @@ jobs:
1212
matrix:
1313
erlang_version:
1414
- "23.3"
15-
- "24.1"
15+
- "24.3"
1616
include:
1717
- erlang_version: "23.3"
1818
short_version: "23"
19-
- erlang_version: "24.1"
19+
- erlang_version: "24.3"
2020
short_version: "24"
2121
timeout-minutes: 10
2222
steps:
@@ -29,7 +29,7 @@ jobs:
2929
with:
3030
path: rbe-erlang-platform
3131
repository: rabbitmq/rbe-erlang-platform
32-
branch: linux-erlang-${{ matrix.erlang_version }}
32+
ref: linux-erlang-${{ matrix.erlang_version }}
3333
- name: DETERMINE LATEST COMMIT
3434
id: find-commit
3535
working-directory: rbe-erlang-platform
@@ -54,6 +54,7 @@ jobs:
5454
5555
for remote build execution (RBE) with BuildBuddy
5656
labels: |
57+
backport-v3.10.x
5758
backport-v3.9.x
5859
backport-v3.8.x
5960
branch: bump-rbe-${{ matrix.short_version }}
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Update rules_erlang
2+
on:
3+
schedule:
4+
- cron: '0 3 * * *'
5+
workflow_dispatch:
6+
jobs:
7+
update-rules_erlang:
8+
name: Update rules_erlang
9+
runs-on: ubuntu-latest
10+
timeout-minutes: 10
11+
steps:
12+
- name: CHECKOUT REPOSITORY
13+
uses: actions/checkout@v3
14+
with:
15+
path: rabbitmq-server
16+
- name: CHECKOUT rules_erlang
17+
uses: actions/checkout@v3
18+
with:
19+
repository: rabbitmq/rules_erlang
20+
path: rules_erlang
21+
- name: DETERMINE LATEST COMMIT
22+
id: find-commit
23+
working-directory: rules_erlang
24+
run: |
25+
echo "::set-output name=SHA::$(git rev-parse HEAD)"
26+
- name: UPDATE rules_erlang COMMIT
27+
working-directory: rabbitmq-server
28+
run: |
29+
sudo npm install --global --silent @bazel/buildozer
30+
echo "$(cat WORKSPACE.bazel | npx buildozer 'set commit "${{ steps.find-commit.outputs.SHA }}"' -:rules_erlang)" > WORKSPACE.bazel
31+
git diff
32+
- name: CREATE PULL REQUEST
33+
uses: peter-evans/[email protected]
34+
with:
35+
token: ${{ secrets.REPO_SCOPED_TOKEN }}
36+
committer: GitHub <[email protected]>
37+
author: GitHub <[email protected]>
38+
path: rabbitmq-server
39+
title: Adopt latest rules_erlang
40+
commit-message: |
41+
Adopt latest rules_erlang
42+
43+
- rules_erlang@${{ steps.find-commit.outputs.SHA }}
44+
branch: bump-rules_erlang
45+
delete-branch: true

0 commit comments

Comments
 (0)