merge linux CI runner

This commit is contained in:
Nick Fisher
2025-06-25 11:06:47 +08:00
3 changed files with 48 additions and 17 deletions

View File

@@ -8,15 +8,31 @@ on:
jobs:
update-goldens:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Setup LLVM
uses: KyleMayes/install-llvm-action@v1
with:
version: "16"
- name: Add LLVM to PATH
run: |
echo "${{ github.workspace }}/llvm/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=${{ github.workspace }}/llvm/lib/x86_64-unknown-linux-gnu/" >> $GITHUB_ENV
- name: Verify installation
run: clang --version
- name: Install Vulkan SDK and dependencies
run: |
wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-jammy.list https://packages.lunarg.com/vulkan/lunarg-vulkan-jammy.list
sudo apt-get update
sudo apt-get install -y vulkan-sdk
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: master
architecture: X64
- run: cd thermion_dart && dart pub get && dart --enable-experiment=native-assets test
- run: cd thermion_dart && dart pub get && dart --enable-experiment=native-assets test test/asset_tests.dart
- name: Zip goldens
run: zip -r goldens.zip ./thermion_dart/test/output
- name: Upload golden images
@@ -24,6 +40,15 @@ jobs:
with:
name: golden-images-${{ github.sha }}
path: goldens.zip
- name: Upload logs
if: failure() || steps.build.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: build-logs
path: |
${{ github.workspace }}/thermion_dart/.dart_tool/thermion_dart/log/build.log
retention-days: 5
flutter_examples:
name: flutter_examples
runs-on: macos-latest

View File

@@ -76,11 +76,9 @@ void main(List<String> args) async {
"filament",
"backend",
"filameshio",
"viewer",
if (targetOS != OS.iOS) "filamat",
"meshoptimizer",
"mikktspace",
"geometry",
if (targetOS == OS.linux) "shaders",
//"geometry",
"utils",
"filabridge",
"gltfio_core",
@@ -97,22 +95,20 @@ void main(List<String> args) async {
"stb",
"uberzlib",
"smol-v",
"basis_transcoder",
"uberarchive",
"zstd",
"basis_transcoder",
"mikktspace",
"geometry",
if (targetOS == OS.macOS) ...["matdbg", "fgviewer"]
];
if (platform == "windows") {
if (targetOS == OS.windows) {
// we just need the libDir and don't need to explicitly link the actual libs
// (these are linked via ThermionWin32.h)
libDir =
Directory(libDir).uri.toFilePath(windows: targetOS == OS.windows);
} else {
libs.add("stdc++");
}
final flags = []; //"-fsanitize=address"];
}
final defines = <String, String?>{};
logger.info("User defines : ${input.userDefines}");
@@ -121,7 +117,10 @@ void main(List<String> args) async {
defines["ENABLE_TRACING"] = "1";
}
final flags = [ ]; //"-fsanitize=address"];
var frameworks = [];
if (platform != "windows") {
flags.addAll(['-std=c++17']);
} else {
@@ -170,6 +169,8 @@ void main(List<String> args) async {
libs.addAll(["bluegl", "bluevk"]);
} else if (platform == "android") {
libs.addAll(["GLESv3", "EGL", "bluevk", "dl", "android"]);
} else if (targetOS == OS.linux) {
libs.addAll(["bluevk","bluegl"]);
}
frameworks = frameworks.expand((f) => ["-framework", f]).toList();
@@ -189,12 +190,18 @@ void main(List<String> args) async {
: ['native/include', 'native/include/filament'],
defines: platform == "windows" ? {} : defines,
flags: [
if (targetOS == OS.macOS) ...['-mmacosx-version-min=13.0'],
if (targetOS == OS.macOS) '-mmacosx-version-min=13.0',
if (targetOS == OS.iOS) '-mios-version-min=13.0',
...flags,
...frameworks,
if (platform != "windows") ...[
...libs.map((lib) => "-l$lib"),
if(targetOS == OS.linux)
...[ "-stdlib=libc++", "-Wl,--whole-archive" ],
if (targetOS != OS.windows)...[
...libs.map((lib) => "-l$lib"),
if(targetOS == OS.linux)
"-Wl,--no-whole-archive",
if(targetOS != OS.linux)
"-lstdc++",
"-L$libDir"
],
if (platform == "windows") ...[

View File

@@ -25,7 +25,6 @@
#include "Log.hpp"
#define STB_IMAGE_IMPLEMENTATION
#include <filament/third_party/stb/stb_image.h>
#ifdef __cplusplus