From 26c2aa0399d125ad14873c464fd4f769bbd58954 Mon Sep 17 00:00:00 2001 From: Rajesh Malviya Date: Fri, 18 Oct 2024 00:59:32 +0530 Subject: [PATCH] check: Change runner image to `ubuntu-24.04`; add step to install system dependency Change the runner image to use `ubuntu-24.04` directly, because `ubuntu-latest` may cause CI failures when there are unexpected changes in the future versions of the runner image. Then also add a step to manually install the `libsqlite3-dev` package, which we need. The `package:sqlite3` requires the system-installed sqlite3 shared library (`libsqlite3.so`) when running directly via Dart, on Linux. Whereas, when running under Flutter, it uses bundled libraries provided by `package:sqlite3_flutter_libs`. Previously, with `ubuntu-22.04` the `libsqlite3-dev` package was pre-installed: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2204-Readme.md#installed-apt-packages However, the `ubuntu-24.04` image no longer includes this package by default: https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md#installed-apt-packages Without that package, five unit tests would fail with the following error: Invalid argument(s): Failed to load dynamic library 'libsqlite3.so': libsqlite3.so: cannot open shared object file: No such file or directory dart:ffi new DynamicLibrary.open package:sqlite3/src/ffi/load_library.dart 52:27 _defaultOpen package:sqlite3/src/ffi/load_library.dart 127:12 OpenDynamicLibrary.openSqlite package:sqlite3/src/ffi/api.dart 13:39 sqlite3 package:drift/native.dart 313:12 _NativeDelegate.openDatabase package:drift/src/sqlite3/database.dart 79:19 Sqlite3Delegate.open package:drift/src/runtime/executor/helpers/engines.dart 431:22 DelegatedDatabase.ensureOpen. --- .github/workflows/ci.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3db05e8dfd..15b124739d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,10 +4,13 @@ on: [push, pull_request] jobs: check: - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4.1.7 + - name: Install system dependencies + run: TERM=dumb sudo apt install libsqlite3-dev -y + - name: Set up JDK uses: actions/setup-java@v4.2.1 with: