Skip to content

Commit e26e99d

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 9759ad2 commit e26e99d

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
@@ -4,7 +4,7 @@ on: [push, pull_request]
44

55
jobs:
66
detect-code-related-file-changes:
7-
runs-on: ubuntu-22.04
7+
runs-on: ubuntu-24.04
88
outputs:
99
has_code_related_changes: ${{ steps.set_has_code_related_changes.outputs.has_code_related_changes }}
1010
steps:
@@ -36,7 +36,7 @@ jobs:
3636
host-x64:
3737
needs: [detect-code-related-file-changes]
3838
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
39-
runs-on: ubuntu-22.04
39+
runs-on: ubuntu-24.04
4040
steps:
4141
- uses: actions/checkout@v4
4242
- name: install-dependencies
@@ -46,7 +46,7 @@ jobs:
4646
.ci/riscv-toolchain-install.sh
4747
wget https://apt.llvm.org/llvm.sh
4848
sudo chmod +x ./llvm.sh
49-
sudo ./llvm.sh 17
49+
sudo ./llvm.sh 18
5050
shell: bash
5151
- name: default build
5252
run: make
@@ -65,6 +65,11 @@ jobs:
6565
make distclean && make ENABLE_SDL=0 check -j$(nproc)
6666
- name: gdbstub test
6767
run: |
68+
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get -y install tzdata # without this, the following installation will require manual intervention to set tzdata
69+
sudo apt install software-properties-common -y
70+
sudo add-apt-repository ppa:deadsnakes/ppa
71+
sudo apt update
72+
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
6873
make distclean ENABLE_GDBSTUB=1 gdbstub-test
6974
- name: JIT test
7075
run: |
@@ -80,7 +85,7 @@ jobs:
8085
host-arm64:
8186
needs: [detect-code-related-file-changes]
8287
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
83-
runs-on: ubuntu-22.04
88+
runs-on: ubuntu-24.04
8489
steps:
8590
- name: checkout code
8691
uses: actions/checkout@v4
@@ -100,7 +105,7 @@ jobs:
100105
git config --global --add safe.directory ${{ github.workspace }}/src/mini-gdbstub
101106
wget https://apt.llvm.org/llvm.sh
102107
chmod +x ./llvm.sh
103-
./llvm.sh 17
108+
./llvm.sh 18
104109
# Append custom commands here
105110
run: |
106111
make -j$(nproc)
@@ -113,12 +118,12 @@ jobs:
113118
coding-style:
114119
needs: [detect-code-related-file-changes]
115120
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
116-
runs-on: ubuntu-22.04
121+
runs-on: ubuntu-24.04
117122
steps:
118123
- uses: actions/checkout@v4
119124
- name: coding convention
120125
run: |
121-
sudo apt-get install -q -y clang-format-12
126+
sudo apt-get install -q -y clang-format-18
122127
.ci/check-newline.sh
123128
.ci/check-format.sh
124129
shell: bash
@@ -136,7 +141,7 @@ jobs:
136141
sudo apt-get install -q -y clang clang-tools libsdl2-dev libsdl2-mixer-dev
137142
wget https://apt.llvm.org/llvm.sh
138143
chmod +x ./llvm.sh
139-
sudo ./llvm.sh 17
144+
sudo ./llvm.sh 18
140145
shell: bash
141146
- name: run scan-build without JIT
142147
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
@@ -163,7 +168,7 @@ jobs:
163168
docker-hub-build-and-publish:
164169
needs: [detect-code-related-file-changes]
165170
if: needs.detect-code-related-file-changes.outputs.has_code_related_changes == 'true'
166-
runs-on: ubuntu-22.04
171+
runs-on: ubuntu-24.04
167172
steps:
168173
- name: Check out the repo
169174
uses: actions/checkout@v4

0 commit comments

Comments
 (0)