forked from RedisJSON/RedisJSON
-
Notifications
You must be signed in to change notification settings - Fork 0
167 lines (163 loc) · 5.76 KB
/
flow-azurelinux3-arm.yml
File metadata and controls
167 lines (163 loc) · 5.76 KB
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
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
name: Build and Test Azure Linux 3 ARM instances
on:
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
inputs:
redis-ref:
description: 'Redis ref to checkout'
required: true
default: 'unstable'
run-test:
type: boolean
default: true
beta-version:
description: 'Beta version for S3 uploads'
type: string
required: false
workflow_call: # Allows to run this workflow from another workflow
inputs:
redis-ref:
description: 'Redis ref to checkout'
type: string
required: true
run-test:
type: boolean
default: true
beta-version:
description: 'Beta version for S3 uploads'
type: string
required: false
permissions:
id-token: write # This is required for requesting the JWT
contents: read # This is required for actions/checkout
jobs:
setup-environment:
runs-on: ubuntu-latest
outputs:
TAGGED: ${{ steps.set-env.outputs.TAGGED }}
TAG: ${{ steps.set-env.outputs.TAG }}
BRANCH: ${{ steps.set-env.outputs.BRANCH }}
TAG_OR_BRANCH: ${{ steps.set-env.outputs.TAG }}${{ steps.set-env.outputs.BRANCH }}
redis-ref: ${{ steps.set-env.outputs.redis-ref }}
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: set env
id: set-env
uses: ./.github/actions/setup-env
with:
github-ref: ${{ github.ref }}
redis-ref: ${{ inputs.redis-ref }}
beta-version: ${{ inputs.beta-version }}
azurelinux3-arm64:
runs-on: ubuntu24-arm64-4-16 # ubuntu24-arm64-2-8
needs: setup-environment
strategy:
matrix:
docker:
- image: "mcr.microsoft.com/azurelinux/base/core:3.0"
nick: "azurelinux3"
install_git: |
tdnf install --noplugins --skipsignature -y ca-certificates git
install_deps: |
tdnf -y update
tdnf install -y \
git \
wget \
gcc \
clang-devel \
llvm-devel \
make \
cmake \
libffi-devel \
openssl-devel \
build-essential \
zlib-devel \
bzip2-devel \
python3-devel \
which \
unzip \
ca-certificates \
python3-pip \
curl \
rsync
defaults:
run:
shell: bash
env:
TAGGED: ${{ needs.setup-environment.outputs.TAGGED }}
VERSION: ${{ needs.setup-environment.outputs.TAG }}
BRANCH: ${{ needs.setup-environment.outputs.BRANCH }}
TAG_OR_BRANCH: ${{ needs.setup-environment.outputs.TAG_OR_BRANCH}}
container:
image: ${{ matrix.docker.image }}
steps:
- name: Install git
run: |
${{ matrix.docker.install_git }}
- name: git checkout
run: |
# Perform checkout
REPO_URL="https://github.com/${{ github.repository }}.git"
# Clone the repository to the current directory
git config --global --add safe.directory /__w/${{ github.repository }}
git clone --recurse-submodules --depth=1 $REPO_URL .
REF=${{github.sha}}
git fetch origin ${REF}
git checkout ${REF}
git submodule update --init --recursive
- name: Install dependencies
run: |
${{ matrix.docker.install_deps }}
- name: Get Redis
run: |
# Perform checkout
REPO_URL="https://github.com/redis/redis.git"
# Clone the repository to the current directory
git clone --recurse-submodules $REPO_URL redis
cd redis
git fetch origin ${{ needs.setup-environment.outputs.redis-ref }}
git checkout ${{ needs.setup-environment.outputs.redis-ref }}
git submodule update --init --recursive
- name: Get Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
source "$HOME/.cargo/env"
rustup update
rustup update nightly
rustup component add rust-src --toolchain nightly
- name: Install python dependencies
run: |
echo ::group::activate venv
python3 -m venv venv
echo "source $PWD/venv/bin/activate" >> ~/.bash_profile
source venv/bin/activate
echo ::endgroup::
echo ::group::install requirements
pip install -q --upgrade setuptools
# Upgrade pip to latest version to ensure ARM64 wheel support
pip install -q --upgrade "pip>=21.0"
# Install compatible Cython version as fallback for source builds
pip install -q "Cython<3.0"
# Prefer binary wheels to avoid compilation issues on ARM64
pip install -q --prefer-binary -r tests/pytest/requirements.txt
pip install -q --prefer-binary -r .install/build_package_requirements.txt
echo ::endgroup::
env:
PIP_BREAK_SYSTEM_PACKAGES: 1
- name: build
uses: ./.github/actions/build-json-module-and-redis-with-cargo
- name: Run tests
uses: ./.github/actions/run-tests
- name: Pack module
uses: ./.github/actions/pack-module
with:
beta-version: ${{ inputs.beta-version }}
- name: Upload artifacts to S3
uses: ./.github/actions/upload-artifacts-to-s3-without-make
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
github-ref: ${{ github.ref }}
beta-version: ${{ inputs.beta-version }}