Skip to content

Commit 5aee672

Browse files
committed
ci: update compilers
1 parent 9fe5ec5 commit 5aee672

File tree

7 files changed

+49
-49
lines changed

7 files changed

+49
-49
lines changed

.github/workflows/linux-test.yml

Lines changed: 10 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: true
1717
jobs:
1818
build:
19-
runs-on: ubuntu-22.04
19+
runs-on: ubuntu-24.04
2020
steps:
2121
- uses: actions/checkout@v4
2222
with:
@@ -37,18 +37,18 @@ jobs:
3737
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/**/*.cs
3838
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.bytes
3939
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.txt
40-
key: libs-ubuntu-22.04-v1-${{ hashFiles('cache_key.txt') }}
40+
key: libs-ubuntu-24.04-v1-${{ hashFiles('cache_key.txt') }}
4141

4242
# Setup build tools
4343
- name: Mount bazel cache
4444
if: steps.cache-libs.outputs.cache-hit != 'true'
4545
uses: actions/cache/restore@v4
4646
with:
4747
path: "~/.cache/bazel"
48-
key: bazel-ubuntu-22.04-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
48+
key: bazel-ubuntu-24.04-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
4949
restore-keys: |
50-
bazel-ubuntu-22.04-v1-${{ hashFiles('WORKSPACE') }}-
51-
bazel-ubuntu-22.04-v1-
50+
bazel-ubuntu-24.04-v1-${{ hashFiles('WORKSPACE') }}-
51+
bazel-ubuntu-24.04-v1-
5252
5353
- name: Remove cache_key.txt
5454
run: |
@@ -63,21 +63,10 @@ jobs:
6363
- name: Install dependencies
6464
if: steps.cache-libs.outputs.cache-hit != 'true'
6565
run: |
66-
# install GCC/G++ 11
67-
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
68-
sudo apt-get update
69-
sudo apt-get install -y --no-install-recommends gcc-11 g++-11
70-
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
71-
72-
# install Clang 16
73-
wget https://apt.llvm.org/llvm.sh
74-
chmod +x llvm.sh
75-
sudo ./llvm.sh 16
76-
sudo ln -sf /usr/bin/clang-16 /usr/bin/clang
77-
sudo ln -sf /usr/bin/clang++-16 /usr/bin/clang++
78-
sudo ln -sf /usr/bin/clang-format-16 /usr/bin/clang-format
79-
8066
# install NuGet
67+
sudo apt update
68+
sudo apt-get install -y --no-install-recommends mono-complete
69+
8170
sudo curl -o /usr/local/bin/nuget.exe https://dist.nuget.org/win-x86-commandline/latest/nuget.exe
8271
bash -c 'echo -e "#!/bin/bash\nmono /usr/local/bin/nuget.exe \$@" | sudo tee -a /usr/local/bin/nuget'
8372
sudo chmod +x /usr/local/bin/nuget
@@ -106,7 +95,7 @@ jobs:
10695
uses: actions/cache/save@v4
10796
with:
10897
path: ~/.cache/bazel
109-
key: bazel-ubuntu-22.04-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
98+
key: bazel-ubuntu-24.04-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
11099

111100
test:
112101
runs-on: ${{ matrix.os }}
@@ -115,7 +104,7 @@ jobs:
115104
fail-fast: false
116105
matrix:
117106
os:
118-
- ubuntu-22.04
107+
- ubuntu-24.04
119108
unityVersion:
120109
- 2022.3.34f1
121110
- 2021.3.33f1

.github/workflows/macos-test.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ on:
1616
required: true
1717
jobs:
1818
build:
19-
runs-on: macos-13
19+
runs-on: macos-14
2020
steps:
2121
- uses: actions/checkout@v4
2222
with:
@@ -37,18 +37,18 @@ jobs:
3737
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/**/*.cs
3838
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.bytes
3939
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.txt
40-
key: libs-macos-13-v1-${{ hashFiles('cache_key.txt') }}
40+
key: libs-macos-14-v1-${{ hashFiles('cache_key.txt') }}
4141

4242
# Setup build tools
4343
- name: Mount bazel cache
4444
if: steps.cache-libs.outputs.cache-hit != 'true'
4545
uses: actions/cache/restore@v4
4646
with:
4747
path: /private/var/tmp/_bazel_runner
48-
key: bazel-macos-13-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
48+
key: bazel-macos-14-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
4949
restore-keys: |
50-
bazel-macos-13-v1-${{ hashFiles('WORKSPACE') }}-
51-
bazel-macos-13-v1-
50+
bazel-macos-14-v1-${{ hashFiles('WORKSPACE') }}-
51+
bazel-macos-14-v1-
5252
5353
- name: Remove cache_key.txt
5454
run: |
@@ -84,7 +84,7 @@ jobs:
8484
uses: actions/cache/save@v4
8585
with:
8686
path: /private/var/tmp/_bazel_runner
87-
key: bazel-macos-13-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
87+
key: bazel-macos-14-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
8888

8989
test:
9090
runs-on: ${{ matrix.os }}
@@ -93,7 +93,7 @@ jobs:
9393
fail-fast: false
9494
matrix:
9595
os:
96-
- macos-13
96+
- macos-14
9797
unity:
9898
- { version: "2022.3.34f1", changeset: "4886f5360533" }
9999
- { version: "2021.3.33f1", changeset: "ee5a2aa03ab2" }

.github/workflows/package.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,15 @@ jobs:
113113
with:
114114
ref: ${{ inputs.ref }}
115115

116+
- name: Install Clang 16
117+
run: |
118+
brew install llvm
119+
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
120+
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> /Users/runner/.bash_profile
121+
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> /Users/runner/.bash_profile
122+
123+
clang --version
124+
116125
# Setup Python
117126
- uses: actions/setup-python@v5
118127
with:

.github/workflows/windows-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ on:
1313
required: true
1414
jobs:
1515
build:
16-
runs-on: windows-2019
16+
runs-on: windows-2022
1717
steps:
1818
- uses: actions/checkout@v4
1919
with:

docker/linux/x86_64/Dockerfile

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,21 +30,11 @@ RUN apt-get update && \
3030
wget \
3131
zip
3232

33-
# Upgrade binutils (>= 2.36)
34-
RUN curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.gz && \
35-
tar -xvzof binutils-2.36.tar.gz && \
36-
cd binutils-2.36 && \
37-
mkdir build && \
38-
cd build && \
39-
../configure --prefix=/usr && \
40-
make && \
41-
make install
42-
43-
# Install gcc-11
33+
# Install gcc-13
4434
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
4535
apt-get update && \
46-
apt-get install -y --no-install-recommends gcc-11 g++-11 && \
47-
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
36+
apt-get install -y --no-install-recommends gcc-13 g++-13 && \
37+
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-13 100 --slave /usr/bin/g++ g++ /usr/bin/g++-13
4838

4939
# Install Clang 16
5040
RUN curl https://apt.llvm.org/llvm.sh -o llvm.sh && \
@@ -54,6 +44,18 @@ RUN curl https://apt.llvm.org/llvm.sh -o llvm.sh && \
5444
ln -sf /usr/bin/clang++-16 /usr/bin/clang++ && \
5545
ln -sf /usr/bin/clang-format-16 /usr/bin/clang-format
5646

47+
# Upgrade binutils (>= 2.40)
48+
RUN apt-get install -y --no-install-recommends bison texinfo && \
49+
curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.40.tar.gz && \
50+
tar -xvzof binutils-2.40.tar.gz && \
51+
cd binutils-2.40 && \
52+
mkdir build && \
53+
cd build && \
54+
../configure --prefix=/usr --enable-gold --enable-ld=default && \
55+
make -j `nproc` && \
56+
make install
57+
58+
5759
FROM base AS android
5860

5961
WORKDIR /tmp

docker/windows/x86_64/Dockerfile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ ARG NODE_VERSION
3737

3838
RUN setx path "C:\msys64\usr\bin;%PATH%"
3939

40-
# Install Visual C++ Build Tools 2019 and WinSDK
41-
ARG CHANNEL_URL=https://aka.ms/vs/16/release/channel
40+
# Install Visual C++ Build Tools 2022 and WinSDK
41+
ARG CHANNEL_URL=https://aka.ms/vs/17/release/channel
4242

4343
RUN curl --retry 4 --connect-timeout 10 -L https://nodejs.org/dist/v%NODE_VERSION%/node-v%NODE_VERSION%-x64.msi -o C:\TEMP\node-install.msi && `
4444
start /wait msiexec.exe /i C:\TEMP\node-install.msi /l*vx "%TEMP%\MSI-node-install.log" /qn ADDLOCAL=ALL && `
4545
del C:\TEMP\node-install.msi && `
4646
curl --retry 4 --connect-timeout 10 -L %CHANNEL_URL% -o C:\TEMP\VisualStudio.chman && `
47-
curl --retry 4 --connect-timeout 10 -L https://aka.ms/vs/16/release/vs_buildtools.exe -o C:\TEMP\vs_buildtools.exe && `
47+
curl --retry 4 --connect-timeout 10 -L https://aka.ms/vs/17/release/vs_buildtools.exe -o C:\TEMP\vs_buildtools.exe && `
4848
C:\TEMP\vs_buildtools.exe --quiet --wait --norestart --nocache `
49-
--installPath "C:\Program Files (x86)\Microsoft Visual Studio\2019\BuildTools" `
49+
--installPath "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools" `
5050
--channelUri C:\TEMP\VisualStudio.chman `
5151
--installChannelUri C:\TEMP\VisualStudio.chman `
5252
--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended && `
53-
curl --retry 4 --connect-timeout 10 -L https://aka.ms/vs/16/release/vc_redist.x64.exe -o C:\TEMP\vc_redist.x64.exe && `
53+
curl --retry 4 --connect-timeout 10 -L https://aka.ms/vs/17/release/vc_redist.x64.exe -o C:\TEMP\vc_redist.x64.exe && `
5454
start /wait C:\TEMP\vc_redist.x64.exe /install /quiet /norestart && `
5555
del C:\TEMP\vc_redist.x64.exe
5656

third_party/opencv.BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,14 +183,14 @@ cmake(
183183
cache_entries = CACHE_ENTRIES,
184184
generate_args = select({
185185
"@bazel_tools//src/conditions:windows": [
186-
"-G \"Visual Studio 16 2019\"",
186+
"-G \"Visual Studio 17 2022\"",
187187
"-A x64",
188188
],
189189
"//conditions:default": [],
190190
}),
191191
lib_source = "@opencv//:all",
192192
out_lib_dir = select({
193-
"@bazel_tools//src/conditions:windows": "x64/vc16",
193+
"@bazel_tools//src/conditions:windows": "x64/vc17",
194194
"//conditions:default": ".", # need to include lib/ and share/OpenCV/3rdparty/lib when building static libs
195195
}),
196196
out_static_libs = select({

0 commit comments

Comments
 (0)