Skip to content

Commit 7346561

Browse files
committed
Upgrade CI ubuntu version to 24.04
Required dependencies are all updated, such as - clang-format-18 - LLVM 18 - fix an issue with pip3 install - fix an issue with testing gdbstub (notice that the riscv-gnu-toolchain releases are built using ubuntu 22.04, thus, we need to install libpython3.10 for the CI pipeline to work) Reference: - https://stackoverflow.com/questions/75608323/how-do-i-solve-error-externally-managed-environment-every-time-i-use-pip-3 Signed-off-by: Chun-Hung Tseng <[email protected]>
1 parent a2e3aaa commit 7346561

File tree

2 files changed

+16
-11
lines changed

2 files changed

+16
-11
lines changed

.ci/check-format.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ set -x
88

99
for file in ${SOURCES};
1010
do
11-
clang-format-12 ${file} > expected-format
11+
clang-format-18 ${file} > expected-format
1212
diff -u -p --label="${file}" --label="expected coding style" ${file} expected-format
1313
done
14-
exit $(clang-format-12 --output-replacements-xml ${SOURCES} | egrep -c "</replacement>")
14+
exit $(clang-format-18 --output-replacements-xml ${SOURCES} | egrep -c "</replacement>")

.github/workflows/main.yml

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
comment-always: true
4848
benchmark-data-dir-path: .
4949
detect-code-related-file-changes:
50-
runs-on: ubuntu-22.04
50+
runs-on: ubuntu-24.04
5151
outputs:
5252
has_code_related_changes: ${{ steps.set_has_code_related_changes.outputs.has_code_related_changes }}
5353
steps:
@@ -79,7 +79,7 @@ jobs:
7979
host-x64:
8080
needs: [detect-code-related-file-changes]
8181
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
82-
runs-on: ubuntu-22.04
82+
runs-on: ubuntu-24.04
8383
steps:
8484
- uses: actions/checkout@v4
8585
- name: install-dependencies
@@ -89,7 +89,7 @@ jobs:
8989
.ci/riscv-toolchain-install.sh
9090
wget https://apt.llvm.org/llvm.sh
9191
sudo chmod +x ./llvm.sh
92-
sudo ./llvm.sh 17
92+
sudo ./llvm.sh 18
9393
shell: bash
9494
- name: default build
9595
run: make
@@ -108,6 +108,11 @@ jobs:
108108
make distclean && make ENABLE_SDL=0 check -j$(nproc)
109109
- name: gdbstub test
110110
run: |
111+
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get -y install tzdata # without this, the following installation will require manual intervention to set tzdata
112+
sudo apt install software-properties-common -y
113+
sudo add-apt-repository ppa:deadsnakes/ppa
114+
sudo apt update
115+
sudo apt install libpython3.10 -y # due to the fact that the riscv-gnu-toolchain releases are built for ubuntu 22.04, its dependencies is python3.10
111116
make distclean ENABLE_GDBSTUB=1 gdbstub-test
112117
- name: JIT test
113118
run: |
@@ -123,7 +128,7 @@ jobs:
123128
host-arm64:
124129
needs: [detect-code-related-file-changes]
125130
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
126-
runs-on: ubuntu-22.04
131+
runs-on: ubuntu-24.04
127132
steps:
128133
- name: checkout code
129134
uses: actions/checkout@v4
@@ -143,7 +148,7 @@ jobs:
143148
git config --global --add safe.directory ${{ github.workspace }}/src/mini-gdbstub
144149
wget https://apt.llvm.org/llvm.sh
145150
chmod +x ./llvm.sh
146-
./llvm.sh 17
151+
./llvm.sh 18
147152
# Append custom commands here
148153
run: |
149154
make -j$(nproc)
@@ -156,12 +161,12 @@ jobs:
156161
coding-style:
157162
needs: [detect-code-related-file-changes]
158163
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
159-
runs-on: ubuntu-22.04
164+
runs-on: ubuntu-24.04
160165
steps:
161166
- uses: actions/checkout@v4
162167
- name: coding convention
163168
run: |
164-
sudo apt-get install -q -y clang-format-12
169+
sudo apt-get install -q -y clang-format-18
165170
.ci/check-newline.sh
166171
.ci/check-format.sh
167172
shell: bash
@@ -179,7 +184,7 @@ jobs:
179184
sudo apt-get install -q -y clang clang-tools libsdl2-dev libsdl2-mixer-dev
180185
wget https://apt.llvm.org/llvm.sh
181186
chmod +x ./llvm.sh
182-
sudo ./llvm.sh 17
187+
sudo ./llvm.sh 18
183188
shell: bash
184189
- name: run scan-build without JIT
185190
run: make distclean && scan-build -v -o ~/scan-build --status-bugs --use-cc=clang --force-analyze-debug-code --show-description -analyzer-config stable-report-filename=true -enable-checker valist,nullability make ENABLE_EXT_F=0 ENABLE_SDL=0 ENABLE_JIT=0
@@ -206,7 +211,7 @@ jobs:
206211
docker-hub-build-and-publish:
207212
needs: [detect-code-related-file-changes]
208213
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
209-
runs-on: ubuntu-22.04
214+
runs-on: ubuntu-24.04
210215
steps:
211216
- name: Check out the repo
212217
uses: actions/checkout@v4

0 commit comments

Comments
 (0)