Skip to content

Commit

Permalink
ci: update compilers
Browse files Browse the repository at this point in the history
  • Loading branch information
homuler committed Dec 21, 2024
1 parent 9fe5ec5 commit 1caeecb
Show file tree
Hide file tree
Showing 6 changed files with 31 additions and 13 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/linux-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,18 +37,18 @@ jobs:
Packages/com.github.homuler.mediapipe/Runtime/Scripts/Protobuf/**/*.cs
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.bytes
Packages/com.github.homuler.mediapipe/PackageResources/MediaPipe/*.txt
key: libs-ubuntu-22.04-v1-${{ hashFiles('cache_key.txt') }}
key: libs-ubuntu-22.04-v3-${{ hashFiles('cache_key.txt') }}

# Setup build tools
- name: Mount bazel cache
if: steps.cache-libs.outputs.cache-hit != 'true'
uses: actions/cache/restore@v4
with:
path: "~/.cache/bazel"
key: bazel-ubuntu-22.04-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
key: bazel-ubuntu-22.04-v3-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
restore-keys: |
bazel-ubuntu-22.04-v1-${{ hashFiles('WORKSPACE') }}-
bazel-ubuntu-22.04-v1-
bazel-ubuntu-22.04-v3-${{ hashFiles('WORKSPACE') }}-
bazel-ubuntu-22.04-v3-
- name: Remove cache_key.txt
run: |
Expand All @@ -63,11 +63,11 @@ jobs:
- name: Install dependencies
if: steps.cache-libs.outputs.cache-hit != 'true'
run: |
# install GCC/G++ 11
# install GCC/G++ 14
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install -y --no-install-recommends gcc-11 g++-11
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
sudo apt-get install -y --no-install-recommends gcc-14 g++-14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 --slave /usr/bin/g++ g++ /usr/bin/g++-14
# install Clang 16
wget https://apt.llvm.org/llvm.sh
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
uses: actions/cache/save@v4
with:
path: ~/.cache/bazel
key: bazel-ubuntu-22.04-v1-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}
key: bazel-ubuntu-22.04-v3-${{ hashFiles('WORKSPACE') }}-${{ hashFiles('cache_key.txt') }}

test:
runs-on: ${{ matrix.os }}
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/macos-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Install Clang 16
run: |
brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> /Users/runner/.bash_profile
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> /Users/runner/.bash_profile
clang --version
# Cache built libraries
- name: Concat native library source files
run: |
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,15 @@ jobs:
with:
ref: ${{ inputs.ref }}

- name: Install Clang 16
run: |
brew install llvm
echo 'export PATH="/usr/local/opt/llvm/bin:$PATH"' >> /Users/runner/.bash_profile
echo 'export LDFLAGS="-L/usr/local/opt/llvm/lib"' >> /Users/runner/.bash_profile
echo 'export CPPFLAGS="-I/usr/local/opt/llvm/include"' >> /Users/runner/.bash_profile
clang --version
# Setup Python
- uses: actions/setup-python@v5
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
required: true
jobs:
build:
runs-on: windows-2019
runs-on: windows-2022
steps:
- uses: actions/checkout@v4
with:
Expand Down
6 changes: 3 additions & 3 deletions docker/linux/x86_64/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ RUN curl -O https://ftp.gnu.org/gnu/binutils/binutils-2.36.tar.gz && \
make && \
make install

# Install gcc-11
# Install gcc-14
RUN add-apt-repository ppa:ubuntu-toolchain-r/test -y && \
apt-get update && \
apt-get install -y --no-install-recommends gcc-11 g++-11 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-11 100 --slave /usr/bin/g++ g++ /usr/bin/g++-11
apt-get install -y --no-install-recommends gcc-14 g++-14 && \
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100 --slave /usr/bin/g++ g++ /usr/bin/g++-14

# Install Clang 16
RUN curl https://apt.llvm.org/llvm.sh -o llvm.sh && \
Expand Down
2 changes: 1 addition & 1 deletion third_party/opencv.BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ cmake(
cache_entries = CACHE_ENTRIES,
generate_args = select({
"@bazel_tools//src/conditions:windows": [
"-G \"Visual Studio 16 2019\"",
"-G \"Visual Studio 17 2022\"",
"-A x64",
],
"//conditions:default": [],
Expand Down

0 comments on commit 1caeecb

Please sign in to comment.