Skip to content

Commit

Permalink
Update build.yml to ubuntu-24.04 (#8319)
Browse files Browse the repository at this point in the history
* Update build.yml to ubuntu-24.04

Apparently g++-13 was removed from the ubuntu-22.04 runners.

We also don't have enterprise runners at 24.04 yet, so just use the free ones for now until we get support for those. CI builds might take longer now.

* Update build.yml

Downgrade to g++12 and revert change to using normal runners

* Update build.yml

Go back to ubuntu-24.04 and update both gcc and clang to their latest versions according to [this](https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md?plain=1#L16-L20).

* Update build.yml

Go back to g++13 for now, as we get some exotic warning in g++14 for newer C++ standards.

* Update build.yml

Fix the other issues with `macos-latest` going to arm: https://github.com/actions/runner-images/tree/main?tab=readme-ov-file#available-images and that Swift wasn't installed in the ubuntu-24.04 by default.

* Update build.yml

Disable Kotlin MacOs CI
  • Loading branch information
dbaileychess authored May 29, 2024
1 parent 150644d commit d89f611
Showing 1 changed file with 48 additions and 46 deletions.
94 changes: 48 additions & 46 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:
digests-gcc: ${{ steps.hash-gcc.outputs.hashes }}
digests-clang: ${{ steps.hash-clang.outputs.hashes }}
name: Build Linux
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13, clang++-15]
cxx: [g++-13, clang++-18]
fail-fast: false
steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
with:
files: Linux.flatc.binary.${{ matrix.cxx }}.zip
- name: Generate SLSA subjects - clang
if: matrix.cxx == 'clang++-15' && startsWith(github.ref, 'refs/tags/')
if: matrix.cxx == 'clang++-18' && startsWith(github.ref, 'refs/tags/')
id: hash-clang
run: echo "hashes=$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" >> $GITHUB_OUTPUT
- name: Generate SLSA subjects - gcc
Expand All @@ -63,27 +63,27 @@ jobs:

build-linux-no-file-tests:
name: Build Linux with -DFLATBUFFERS_NO_FILE_TESTS
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: cmake
run: CXX=clang++-15 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CXX_FLAGS="-DFLATBUFFERS_NO_FILE_TESTS" .
run: CXX=clang++-18 cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DFLATBUFFERS_STRICT_MODE=ON -DFLATBUFFERS_CXX_FLAGS="-DFLATBUFFERS_NO_FILE_TESTS" .
- name: build
run: make -j
- name: test
run: ./flattests

build-linux-out-of-source:
name: Build Linux with out-of-source build location
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: make build directory
run: mkdir build
- name: cmake
working-directory: build
run: >
CXX=clang++-15 cmake .. -G "Unix Makefiles" -DFLATBUFFERS_STRICT_MODE=ON
CXX=clang++-18 cmake .. -G "Unix Makefiles" -DFLATBUFFERS_STRICT_MODE=ON
-DFLATBUFFERS_BUILD_CPP17=ON -DFLATBUFFERS_CPP_STD=17
- name: build
working-directory: build
Expand All @@ -97,15 +97,15 @@ jobs:

build-linux-cpp-std:
name: Build Linux C++
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
std: [11, 14, 17, 20, 23]
cxx: [g++-13, clang++-15]
cxx: [g++-13, clang++-18]
exclude:
# Clang++15 10.3.0 stdlibc++ doesn't fully support std 23
- cxx: clang++-15
- cxx: clang++-18
std: 23

steps:
Expand Down Expand Up @@ -220,7 +220,7 @@ jobs:
outputs:
digests: ${{ steps.hash.outputs.hashes }}
name: Build Mac (for Intel)
runs-on: macos-latest
runs-on: macos-latest-large
steps:
- uses: actions/checkout@v3
- name: cmake
Expand Down Expand Up @@ -302,7 +302,7 @@ jobs:

build-android:
name: Build Android (on Linux)
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: set up Java
Expand All @@ -321,10 +321,10 @@ jobs:

build-generator:
name: Check Generated Code
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13, clang++-15]
cxx: [g++-13, clang++-18]
steps:
- uses: actions/checkout@v3
- name: cmake
Expand Down Expand Up @@ -352,7 +352,7 @@ jobs:

build-benchmarks:
name: Build Benchmarks (on Linux)
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
strategy:
matrix:
cxx: [g++-13]
Expand All @@ -370,36 +370,37 @@ jobs:

build-java:
name: Build Java
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: test
working-directory: java
run: mvn test

build-kotlin-macos:
name: Build Kotlin MacOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- uses: gradle/wrapper-validation-action@v1.0.5
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'
- name: Build flatc
run: |
cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .
make -j
echo "${PWD}" >> $GITHUB_PATH
- name: Build
working-directory: kotlin
run: ./gradlew clean iosSimulatorArm64Test macosX64Test macosArm64Test
# Renable
# build-kotlin-macos:
# name: Build Kotlin MacOS
# runs-on: macos-latest-large
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - uses: gradle/wrapper-validation-action@v1.0.5
# - uses: actions/setup-java@v3
# with:
# distribution: 'temurin'
# java-version: '11'
# - name: Build flatc
# run: |
# cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .
# make -j
# echo "${PWD}" >> $GITHUB_PATH
# - name: Build
# working-directory: kotlin
# run: ./gradlew clean iosSimulatorArm64Test macosX64Test macosArm64Test

build-kotlin-linux:
name: Build Kotlin Linux
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v3
Expand All @@ -422,7 +423,7 @@ jobs:

build-rust-linux:
name: Build Rust Linux
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: test
Expand All @@ -440,7 +441,7 @@ jobs:

build-python:
name: Build Python
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -452,7 +453,7 @@ jobs:

build-go:
name: Build Go
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -464,7 +465,7 @@ jobs:

build-php:
name: Build PHP
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -478,7 +479,8 @@ jobs:
build-swift:
name: Build Swift
runs-on: ubuntu-22.04-64core
# Only 22.04 has swift at the moment https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md?plain=1#L30
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: test
Expand All @@ -489,7 +491,7 @@ jobs:
build-swift-wasm:
name: Build Swift Wasm
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
container:
image: ghcr.io/swiftwasm/carton:0.15.3
steps:
Expand All @@ -502,7 +504,7 @@ jobs:

build-ts:
name: Build TS
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -520,7 +522,7 @@ jobs:
build-dart:
name: Build Dart
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
Expand All @@ -535,7 +537,7 @@ jobs:

build-nim:
name: Build Nim
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v3
- name: flatc
Expand All @@ -554,7 +556,7 @@ jobs:
needs: [build-linux, build-windows, build-mac-intel, build-mac-universal]
outputs:
digests: ${{ steps.hash.outputs.digests }}
runs-on: ubuntu-22.04-64core
runs-on: ubuntu-24.04
steps:
- name: Merge results
id: hash
Expand Down

0 comments on commit d89f611

Please sign in to comment.