Update build.yml to ubuntu-24.04 (#8319)

* 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
This commit is contained in:
Derek Bailey
2024-05-28 17:18:00 -07:00
committed by GitHub
parent 150644d7f4
commit d89f611f6f

View File

@@ -21,10 +21,10 @@ jobs:
digests-gcc: ${{ steps.hash-gcc.outputs.hashes }} digests-gcc: ${{ steps.hash-gcc.outputs.hashes }}
digests-clang: ${{ steps.hash-clang.outputs.hashes }} digests-clang: ${{ steps.hash-clang.outputs.hashes }}
name: Build Linux name: Build Linux
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
strategy: strategy:
matrix: matrix:
cxx: [g++-13, clang++-15] cxx: [g++-13, clang++-18]
fail-fast: false fail-fast: false
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@@ -53,7 +53,7 @@ jobs:
with: with:
files: Linux.flatc.binary.${{ matrix.cxx }}.zip files: Linux.flatc.binary.${{ matrix.cxx }}.zip
- name: Generate SLSA subjects - clang - 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 id: hash-clang
run: echo "hashes=$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" >> $GITHUB_OUTPUT run: echo "hashes=$(sha256sum Linux.flatc.binary.${{ matrix.cxx }}.zip | base64 -w0)" >> $GITHUB_OUTPUT
- name: Generate SLSA subjects - gcc - name: Generate SLSA subjects - gcc
@@ -63,11 +63,11 @@ jobs:
build-linux-no-file-tests: build-linux-no-file-tests:
name: Build Linux with -DFLATBUFFERS_NO_FILE_TESTS name: Build Linux with -DFLATBUFFERS_NO_FILE_TESTS
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: cmake - 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 - name: build
run: make -j run: make -j
- name: test - name: test
@@ -75,7 +75,7 @@ jobs:
build-linux-out-of-source: build-linux-out-of-source:
name: Build Linux with out-of-source build location name: Build Linux with out-of-source build location
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: make build directory - name: make build directory
@@ -83,7 +83,7 @@ jobs:
- name: cmake - name: cmake
working-directory: build working-directory: build
run: > 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 -DFLATBUFFERS_BUILD_CPP17=ON -DFLATBUFFERS_CPP_STD=17
- name: build - name: build
working-directory: build working-directory: build
@@ -97,15 +97,15 @@ jobs:
build-linux-cpp-std: build-linux-cpp-std:
name: Build Linux C++ name: Build Linux C++
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
std: [11, 14, 17, 20, 23] std: [11, 14, 17, 20, 23]
cxx: [g++-13, clang++-15] cxx: [g++-13, clang++-18]
exclude: exclude:
# Clang++15 10.3.0 stdlibc++ doesn't fully support std 23 # Clang++15 10.3.0 stdlibc++ doesn't fully support std 23
- cxx: clang++-15 - cxx: clang++-18
std: 23 std: 23
steps: steps:
@@ -220,7 +220,7 @@ jobs:
outputs: outputs:
digests: ${{ steps.hash.outputs.hashes }} digests: ${{ steps.hash.outputs.hashes }}
name: Build Mac (for Intel) name: Build Mac (for Intel)
runs-on: macos-latest runs-on: macos-latest-large
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: cmake - name: cmake
@@ -302,7 +302,7 @@ jobs:
build-android: build-android:
name: Build Android (on Linux) name: Build Android (on Linux)
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: set up Java - name: set up Java
@@ -321,10 +321,10 @@ jobs:
build-generator: build-generator:
name: Check Generated Code name: Check Generated Code
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
strategy: strategy:
matrix: matrix:
cxx: [g++-13, clang++-15] cxx: [g++-13, clang++-18]
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: cmake - name: cmake
@@ -352,7 +352,7 @@ jobs:
build-benchmarks: build-benchmarks:
name: Build Benchmarks (on Linux) name: Build Benchmarks (on Linux)
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
strategy: strategy:
matrix: matrix:
cxx: [g++-13] cxx: [g++-13]
@@ -370,36 +370,37 @@ jobs:
build-java: build-java:
name: Build Java name: Build Java
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: test - name: test
working-directory: java working-directory: java
run: mvn test run: mvn test
build-kotlin-macos: # Renable
name: Build Kotlin MacOS # build-kotlin-macos:
runs-on: macos-latest # name: Build Kotlin MacOS
steps: # runs-on: macos-latest-large
- name: Checkout # steps:
uses: actions/checkout@v3 # - name: Checkout
- uses: gradle/wrapper-validation-action@v1.0.5 # uses: actions/checkout@v3
- uses: actions/setup-java@v3 # - uses: gradle/wrapper-validation-action@v1.0.5
with: # - uses: actions/setup-java@v3
distribution: 'temurin' # with:
java-version: '11' # distribution: 'temurin'
- name: Build flatc # java-version: '11'
run: | # - name: Build flatc
cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF . # run: |
make -j # cmake -DFLATBUFFERS_BUILD_TESTS=OFF -DFLATBUFFERS_BUILD_FLATLIB=OFF -DFLATBUFFERS_BUILD_FLATHASH=OFF .
echo "${PWD}" >> $GITHUB_PATH # make -j
- name: Build # echo "${PWD}" >> $GITHUB_PATH
working-directory: kotlin # - name: Build
run: ./gradlew clean iosSimulatorArm64Test macosX64Test macosArm64Test # working-directory: kotlin
# run: ./gradlew clean iosSimulatorArm64Test macosX64Test macosArm64Test
build-kotlin-linux: build-kotlin-linux:
name: Build Kotlin Linux name: Build Kotlin Linux
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v3 uses: actions/checkout@v3
@@ -422,7 +423,7 @@ jobs:
build-rust-linux: build-rust-linux:
name: Build Rust Linux name: Build Rust Linux
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: test - name: test
@@ -440,7 +441,7 @@ jobs:
build-python: build-python:
name: Build Python name: Build Python
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: flatc - name: flatc
@@ -452,7 +453,7 @@ jobs:
build-go: build-go:
name: Build Go name: Build Go
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: flatc - name: flatc
@@ -464,7 +465,7 @@ jobs:
build-php: build-php:
name: Build PHP name: Build PHP
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: flatc - name: flatc
@@ -478,7 +479,8 @@ jobs:
build-swift: build-swift:
name: 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: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: test - name: test
@@ -489,7 +491,7 @@ jobs:
build-swift-wasm: build-swift-wasm:
name: Build Swift Wasm name: Build Swift Wasm
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
container: container:
image: ghcr.io/swiftwasm/carton:0.15.3 image: ghcr.io/swiftwasm/carton:0.15.3
steps: steps:
@@ -502,7 +504,7 @@ jobs:
build-ts: build-ts:
name: Build TS name: Build TS
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: flatc - name: flatc
@@ -520,7 +522,7 @@ jobs:
build-dart: build-dart:
name: Build Dart name: Build Dart
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1 - uses: dart-lang/setup-dart@v1
@@ -535,7 +537,7 @@ jobs:
build-nim: build-nim:
name: Build Nim name: Build Nim
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
- name: flatc - name: flatc
@@ -554,7 +556,7 @@ jobs:
needs: [build-linux, build-windows, build-mac-intel, build-mac-universal] needs: [build-linux, build-windows, build-mac-intel, build-mac-universal]
outputs: outputs:
digests: ${{ steps.hash.outputs.digests }} digests: ${{ steps.hash.outputs.digests }}
runs-on: ubuntu-22.04-64core runs-on: ubuntu-24.04
steps: steps:
- name: Merge results - name: Merge results
id: hash id: hash