Skip to content

Commit

Permalink
checkout flutter in github workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
lhoward committed Nov 24, 2024
1 parent 0374286 commit 3a6e589
Showing 1 changed file with 34 additions and 21 deletions.
55 changes: 34 additions & 21 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,49 @@ on:
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: Version
run: swift --version
- name: Build
run: swift build
- name: Test
run: swift test
timeout-minutes: 1
# 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: Version
# run: swift --version
# - name: Build
# run: swift build
# - name: Test
# run: swift test
# timeout-minutes: 1

# libegl1-mesa-dev libgles2-mesa-dev libxkbcommon-dev libuv1-dev libinput-dev libdrm-dev libudev-dev libgbm-dev

linux:
linux-wayland:
runs-on: ubuntu-24.04
container: swift:6.0
steps:
- name: Packages
run: |
apt-get update
apt-get install -y liburing-dev libavahi-compat-libdnssd-dev libavahi-client-dev
- name: Checkout
apt-get install -y liburing-dev libavahi-compat-libdnssd-dev libavahi-client-dev libwayland-dev wayland-protocols
- name: Set Paths
run: echo "/opt/flutter-elinux/bin" >> $GITHUB_PATH
- 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: Checkout FlutterSwift
uses: actions/checkout@v4
- name: Version
run: swift --version
- name: Build
- name: Build FlutterSwift
run: swift build --build-tests
- name: Test
- name: Test FlutterSwift
run: swift test --skip-build
- name: Build counter
run: ./build-counter-linux.sh

0 comments on commit 3a6e589

Please sign in to comment.