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