-
Notifications
You must be signed in to change notification settings - Fork 2
66 lines (63 loc) · 2.2 KB
/
swift.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
name: build
on:
push:
pull_request:
workflow_dispatch:
jobs:
darwin:
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: 🔍 Xcode Select
run: |
XCODE_PATH=`mdfind "kMDItemCFBundleIdentifier == 'com.apple.dt.Xcode' && kMDItemVersion = '16.*'" -onlyin /Applications | head -1`
echo "DEVELOPER_DIR=$XCODE_PATH/Contents/Developer" >> $GITHUB_ENV
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: 3.24.5
- name: Version
run: swift --version
- name: Build Flutter package
run: |
cd Examples/counter
flutter pub get
flutter build macos --release
linux-wayland:
runs-on: ubuntu-24.04
container: swift:6.0
env:
FLUTTER_SWIFT_BACKEND: wayland
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