Skip to content

Commit daa6c63

Browse files
committed
修复github cicd没ubuntu 20.04的bug
1 parent 4a4e09d commit daa6c63

1 file changed

Lines changed: 35 additions & 14 deletions

File tree

.github/workflows/ci.yml

Lines changed: 35 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,23 @@ jobs:
3030
.\Release\InteropTest.exe
3131
.\Release\ExtendedTests.exe
3232
33-
build-linux:
34-
runs-on: ubuntu-20.04
33+
build-linux-x64:
34+
runs-on: ubuntu-latest
35+
container:
36+
image: ubuntu:20.04
3537
steps:
36-
- uses: actions/checkout@v4
37-
38-
- name: Setup GCC 13
38+
- name: Install System Dependencies
3939
run: |
40-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
41-
sudo apt-get update
42-
sudo apt-get install -y gcc-13 g++-13 ninja-build
43-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 130 --slave /usr/bin/g++ g++ /usr/bin/g++-13
40+
apt-get update
41+
apt-get install -y git cmake ninja-build g++-10 python3 make curl zip unzip tar pkg-config perl
42+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10
43+
44+
- uses: actions/checkout@v4
4445

4546
- name: Setup VCPKG
4647
run: |
4748
git clone https://github.com/microsoft/vcpkg.git
48-
if [ -f vcpkg/bootstrap-vcpkg.sh ]; then
49-
./vcpkg/bootstrap-vcpkg.sh
50-
else
51-
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
52-
fi
49+
./vcpkg/bootstrap-vcpkg.sh -disableMetrics
5350
echo "VCPKG_ROOT=$PWD/vcpkg" >> $GITHUB_ENV
5451
5552
- name: Configure CMake
@@ -63,3 +60,27 @@ jobs:
6360
run: |
6461
./InteropTest
6562
./ExtendedTests
63+
64+
build-linux-arm64:
65+
runs-on: ubuntu-latest
66+
steps:
67+
- uses: actions/checkout@v4
68+
69+
- name: Set up QEMU
70+
uses: docker/setup-qemu-action@v3
71+
72+
- name: Build and Test in ARM64 Docker
73+
run: |
74+
docker run --rm --platform linux/arm64 -v ${{ github.workspace }}:/workspace -w /workspace ubuntu:20.04 bash -c "
75+
apt-get update && \
76+
apt-get install -y git cmake ninja-build g++-10 python3 make curl zip unzip tar pkg-config perl && \
77+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 100 --slave /usr/bin/g++ g++ /usr/bin/g++-10 && \
78+
git clone https://github.com/microsoft/vcpkg.git && \
79+
./vcpkg/bootstrap-vcpkg.sh -disableMetrics && \
80+
export VCPKG_ROOT=\$PWD/vcpkg && \
81+
cmake -B build -S . -GNinja -DCMAKE_BUILD_TYPE=Release && \
82+
cmake --build build && \
83+
cd build/tests && \
84+
./InteropTest && \
85+
./ExtendedTests
86+
"

0 commit comments

Comments
 (0)