Skip to content

Commit fcc8207

Browse files
authored
Support azure linux 3 arm (#1357) (#1359)
* Support azure linux 3 arm * fix (cherry picked from commit 489cfc6)
1 parent 565489a commit fcc8207

File tree

5 files changed

+179
-0
lines changed

5 files changed

+179
-0
lines changed

.github/workflows/event-ci.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,12 @@ jobs:
3030
os: jammy rocky9 amazonlinux2 azurelinux3
3131
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
3232
secrets: inherit
33+
azurelinux3-arm64:
34+
uses: ./.github/workflows/flow-azurelinux3-arm.yml
35+
needs: [prepare-values]
36+
with:
37+
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
38+
secrets: inherit
3339
linux-valgrind:
3440
uses: ./.github/workflows/flow-linux-x86.yml
3541
needs: [prepare-values]

.github/workflows/event-nightly.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,12 @@ jobs:
4242
with:
4343
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
4444
secrets: inherit
45+
azurelinux3-arm64:
46+
uses: ./.github/workflows/flow-azurelinux3-arm.yml
47+
needs: [prepare-values]
48+
with:
49+
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
50+
secrets: inherit
4551
alpine:
4652
uses: ./.github/workflows/flow-alpine.yml
4753
needs: [prepare-values]

.github/workflows/event-tag.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
with:
3939
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
4040
secrets: inherit
41+
azurelinux3-arm64:
42+
uses: ./.github/workflows/flow-azurelinux3-arm.yml
43+
needs: [prepare-values]
44+
with:
45+
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
46+
secrets: inherit
4147
alpine:
4248
uses: ./.github/workflows/flow-alpine.yml
4349
needs: [prepare-values]

.github/workflows/event-weekly.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,12 @@ jobs:
3838
with:
3939
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
4040
secrets: inherit
41+
azurelinux3-arm64:
42+
uses: ./.github/workflows/flow-azurelinux3-arm.yml
43+
needs: [prepare-values]
44+
with:
45+
redis-ref: ${{needs.prepare-values.outputs.redis-ref}}
46+
secrets: inherit
4147
alpine:
4248
uses: ./.github/workflows/flow-alpine.yml
4349
needs: [prepare-values]
Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
name: Build and Test Azure Linux 3 ARM instances
2+
3+
on:
4+
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
5+
inputs:
6+
redis-ref:
7+
description: 'Redis ref to checkout'
8+
required: true
9+
default: 'unstable'
10+
run-test:
11+
type: boolean
12+
default: true
13+
workflow_call: # Allows to run this workflow from another workflow
14+
inputs:
15+
redis-ref:
16+
description: 'Redis ref to checkout'
17+
type: string
18+
required: true
19+
run-test:
20+
type: boolean
21+
default: true
22+
23+
permissions:
24+
id-token: write # This is required for requesting the JWT
25+
contents: read # This is required for actions/checkout
26+
27+
jobs:
28+
setup-environment:
29+
runs-on: ubuntu-latest
30+
outputs:
31+
TAGGED: ${{ steps.set-env.outputs.TAGGED }}
32+
TAG: ${{ steps.set-env.outputs.TAG }}
33+
BRANCH: ${{ steps.set-env.outputs.BRANCH }}
34+
TAG_OR_BRANCH: ${{ steps.set-env.outputs.TAG }}${{ steps.set-env.outputs.BRANCH }}
35+
redis-ref: ${{ steps.set-env.outputs.redis-ref }}
36+
steps:
37+
- name: checkout
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 0
41+
- name: set env
42+
id: set-env
43+
uses: ./.github/actions/setup-env
44+
with:
45+
github-ref: ${{ github.ref }}
46+
redis-ref: ${{ inputs.redis-ref }}
47+
48+
azurelinux3-arm64:
49+
runs-on: ubuntu24-arm64-4-16 # ubuntu24-arm64-2-8
50+
needs: setup-environment
51+
strategy:
52+
matrix:
53+
docker:
54+
- image: "mcr.microsoft.com/azurelinux/base/core:3.0"
55+
nick: "azurelinux3"
56+
install_git: |
57+
tdnf install --noplugins --skipsignature -y ca-certificates git
58+
install_deps: |
59+
tdnf -y update
60+
tdnf install -y \
61+
git \
62+
wget \
63+
gcc \
64+
clang-devel \
65+
llvm-devel \
66+
make \
67+
cmake \
68+
libffi-devel \
69+
openssl-devel \
70+
build-essential \
71+
zlib-devel \
72+
bzip2-devel \
73+
python3-devel \
74+
which \
75+
unzip \
76+
ca-certificates \
77+
python3-pip \
78+
curl \
79+
rsync
80+
defaults:
81+
run:
82+
shell: bash
83+
env:
84+
TAGGED: ${{ needs.setup-environment.outputs.TAGGED }}
85+
VERSION: ${{ needs.setup-environment.outputs.TAG }}
86+
BRANCH: ${{ needs.setup-environment.outputs.BRANCH }}
87+
TAG_OR_BRANCH: ${{ needs.setup-environment.outputs.TAG_OR_BRANCH}}
88+
container:
89+
image: ${{ matrix.docker.image }}
90+
steps:
91+
- name: Install git
92+
run: |
93+
${{ matrix.docker.install_git }}
94+
- name: git checkout
95+
run: |
96+
# Perform checkout
97+
REPO_URL="https://github.com/${{ github.repository }}.git"
98+
# Clone the repository to the current directory
99+
git config --global --add safe.directory /__w/${{ github.repository }}
100+
git clone --recurse-submodules --depth=1 $REPO_URL .
101+
REF=${{github.sha}}
102+
git fetch origin ${REF}
103+
git checkout ${REF}
104+
git submodule update --init --recursive
105+
- name: Install dependencies
106+
run: |
107+
${{ matrix.docker.install_deps }}
108+
- name: Get Redis
109+
run: |
110+
# Perform checkout
111+
REPO_URL="https://github.com/redis/redis.git"
112+
# Clone the repository to the current directory
113+
git clone --recurse-submodules $REPO_URL redis
114+
cd redis
115+
git fetch origin ${{ needs.setup-environment.outputs.redis-ref }}
116+
git checkout ${{ needs.setup-environment.outputs.redis-ref }}
117+
git submodule update --init --recursive
118+
- name: Get Rust
119+
run: |
120+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
121+
source "$HOME/.cargo/env"
122+
rustup update
123+
rustup update nightly
124+
rustup component add rust-src --toolchain nightly
125+
- name: Install python dependencies
126+
run: |
127+
echo ::group::activate venv
128+
python3 -m venv venv
129+
echo "source $PWD/venv/bin/activate" >> ~/.bash_profile
130+
source venv/bin/activate
131+
echo ::endgroup::
132+
echo ::group::install requirements
133+
pip install -q --upgrade setuptools
134+
# Upgrade pip to latest version to ensure ARM64 wheel support
135+
pip install -q --upgrade "pip>=21.0"
136+
# Install compatible Cython version as fallback for source builds
137+
pip install -q "Cython<3.0"
138+
# Prefer binary wheels to avoid compilation issues on ARM64
139+
pip install -q --prefer-binary -r tests/pytest/requirements.txt
140+
pip install -q --prefer-binary -r .install/build_package_requirements.txt
141+
echo ::endgroup::
142+
env:
143+
PIP_BREAK_SYSTEM_PACKAGES: 1
144+
- name: build
145+
uses: ./.github/actions/build-json-module-and-redis-with-cargo
146+
- name: Run tests
147+
uses: ./.github/actions/run-tests
148+
- name: Pack module
149+
uses: ./.github/actions/pack-module
150+
- name: Upload artifacts to S3
151+
uses: ./.github/actions/upload-artifacts-to-s3-without-make
152+
with:
153+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
154+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
155+
github-ref: ${{ github.ref }}

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy