From 6085417a06af9e9d604091a48ca7957f8875dc7e Mon Sep 17 00:00:00 2001 From: Luke Howard Date: Sun, 24 Nov 2024 03:23:24 +0000 Subject: [PATCH] add gbm Linux runner --- .github/workflows/swift.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.github/workflows/swift.yml b/.github/workflows/swift.yml index 80ccb6d..e6fc479 100644 --- a/.github/workflows/swift.yml +++ b/.github/workflows/swift.yml @@ -64,3 +64,40 @@ jobs: run: swift test --skip-build - name: Build counter run: ./build-counter-linux.sh + + linux-gbm: + runs-on: ubuntu-24.04 + container: swift:6.0 + env: + FLUTTER_SWIFT_BACKEND: gbm + steps: + - name: Packages + run: | + apt-get update + apt-get install -y unzip curl cmake pkg-config liburing-dev libavahi-compat-libdnssd-dev libavahi-client-dev libwayland-dev wayland-protocols libegl1-mesa-dev libgles2-mesa-dev libxkbcommon-dev libuv1-dev libinput-dev libdrm-dev libudev-dev libgbm-dev + - name: Set paths + run: echo "/opt/flutter-elinux/bin" >> $GITHUB_PATH + - name: Checkout FlutterSwift + uses: actions/checkout@v4 + - name: Fix permissions + run: chown -R $(id -u):$(id -g) $PWD + - name: Fetch tags and checkout submodules + run: | + git fetch --prune --unshallow --tags + git submodule init + git submodule update + - name: Checkout Flutter + run: | + FLUTTER_REVISION=`git describe --tags --abbrev=0` + FLUTTER_ROOT=/opt/flutter-elinux + git clone --depth 1 --branch $FLUTTER_REVISION https://github.com/sony/flutter-elinux $FLUTTER_ROOT + (cd $FLUTTER_ROOT; git switch -c $FLUTTER_REVISION) + $FLUTTER_ROOT/bin/flutter-elinux 2>&1 + - name: Version + run: swift --version + - name: Build FlutterSwift + run: swift build --build-tests + - name: Test FlutterSwift + run: swift test --skip-build + - name: Build counter + run: ./build-counter-linux.sh