-
Notifications
You must be signed in to change notification settings - Fork 0
146 lines (133 loc) · 4.64 KB
/
build-linux-aarch64.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
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
name: Build (arm64) redis
on:
push:
paths-ignore:
- 'docs/**'
- 'README.md'
branches:
- master
- '[0-9].[0-9]'
- '[0-9].[0-9].[0-9]'
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}-buildarm64
cancel-in-progress: true
permissions:
contents: read
packages: write
jobs:
start-arm64-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION_ID }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
ec2-image-id: ${{ secrets.AWS_AMI_ID }}
ec2-instance-type: t4g.small
subnet-id: ${{ secrets.AWS_SUBNET_ID }}
security-group-id: ${{ secrets.AWS_SECGROUP_ID }}
debian-bullseye-arm64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: debian:bullseye-slim
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: bullseye
arch: arm64
ubuntu-bionic-arm64:
needs: start-arm64-runner
uses: ./.github/workflows/REUSABLE-linux.yml
with:
docker_image: ubuntu:18.04
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: ubuntu18.04
arch: arm64
secrets: inherit
ubuntu-focal-arm64:
needs: start-arm64-runner
uses: ./.github/workflows/REUSABLE-linux.yml
with:
docker_image: ubuntu:20.04
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: ubuntu20.04
arch: arm64
secrets: inherit
ubuntu-jammy-arm64:
needs: start-arm64-runner
uses: ./.github/workflows/REUSABLE-linux.yml
with:
docker_image: ubuntu:22.04
deps: apt-get update -qq && apt-get install -qqy build-essential libssl-dev python3 python3-pip jq wget
osnick: ubuntu22.04
arch: arm64
secrets: inherit
rhel7-arm64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: centos:7
deps: |
yum install -y epel-release
yum install -y gcc make jemalloc-devel openssl-devel python3 python3-pip jq wget
osnick: rhel7
arch: arm64
rhel8-arm64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: rockylinux:8
deps: |
dnf install -y epel-release
dnf install -y gcc make jemalloc-devel openssl-devel tar git python3 python3-pip jq wget
osnick: rhel8
arch: arm64
rhel9-arm64:
uses: ./.github/workflows/REUSABLE-linux.yml
secrets: inherit
with:
docker_image: rockylinux:9
deps: |
dnf install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm
dnf install -y gcc make jemalloc-devel openssl-devel tar git python3 python3-pip jq wget
osnick: rhel9
arch: arm64
stop-arm64-runner:
name: Stop self-hosted EC2 runner
needs:
- start-arm64-runner
- ubuntu-bionic-arm64
- ubuntu-focal-arm64
- ubuntu-jammy-arm64
- rhel7-arm64
- rhel8-arm64
- rhel9-arm64
runs-on: ubuntu-latest
if: ${{ always() }} # required to stop the runner even if the error happened in the previous jobs
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ${{ secrets.AWS_REGION_ID }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_ACCESS_TOKEN }}
label: ${{ needs.start-arm64-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-arm64-runner.outputs.ec2-instance-id }}