Skip to content

Commit 2674b1c

Browse files
authored
ci: upgrade flutter version on windows arm (#1269)
1 parent 4c90b38 commit 2674b1c

2 files changed

Lines changed: 46 additions & 9 deletions

File tree

.github/workflows/build.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,15 +44,17 @@ jobs:
4444
- arch: arm64
4545
os: windows-11-arm
4646
llvm_ver: "20251202" # Only ARM64
47-
flutter_channel: "master"
48-
flutter_version: "8817d45220d" # Only ARM64
47+
flutter_channel: "main"
48+
flutter_version: "7e1c8868"
4949
- arch: amd64
5050
os: windows-2022
51-
flutter_channel: "stable"
5251
runs-on: ${{ matrix.os }}
5352

5453
steps:
5554
- uses: actions/checkout@v3
55+
- name: Enable long paths for flutter main branch checks
56+
run: |
57+
git config --global core.longpaths true
5658
5759
# Install LLVM environment only on ARM64
5860
- name: Install llvm-mingw-ucrt-aarch64 (ARM64 only)
@@ -84,7 +86,7 @@ jobs:
8486
go-version: ${{ env.GO_VERSION }}
8587
- uses: subosito/flutter-action@v2
8688
with:
87-
channel: ${{ matrix.flutter_channel }}
89+
channel: ${{ matrix.flutter_channel || 'stable' }}
8890
flutter-version: ${{ matrix.flutter_version || env.FLUTTER_VERSION }}
8991
- name: Build
9092
env:

.github/workflows/test.yml

Lines changed: 40 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,21 +66,56 @@ jobs:
6666
files: ./coverage.txt
6767
token: ${{ secrets.CODECOV_UPLOAD_TOKEN }}
6868
build-desktop:
69-
name: Build desktop check
70-
runs-on: ${{ matrix.os }}
7169
strategy:
7270
matrix:
73-
os: [windows-2022, macos-latest, ubuntu-22.04, ubuntu-22.04-arm]
71+
include:
72+
- os: windows-2022
73+
- os: windows-11-arm
74+
llvm_ver: "20251202" # Only ARM64
75+
flutter_channel: "main"
76+
flutter_version: "7e1c8868"
77+
- os: macos-latest
78+
- os: ubuntu-22.04
79+
- os: ubuntu-22.04-arm
80+
flutter_channel: "main"
81+
name: Build desktop check (${{ matrix.os }})
82+
runs-on: ${{ matrix.os }}
7483
needs: [test]
7584
steps:
7685
- uses: actions/checkout@v3
86+
- name: Enable long paths for flutter main branch checks
87+
run: |
88+
git config --global core.longpaths true
89+
- name: Install llvm-mingw-ucrt-aarch64 (ARM64 only)
90+
if: matrix.os == 'windows-11-arm'
91+
run: |
92+
$ver = "${{ matrix.llvm_ver }}"
93+
$url = "https://github.com/mstorsjo/llvm-mingw/releases/download/$ver/llvm-mingw-$ver-ucrt-aarch64.zip"
94+
$zip = "$env:RUNNER_TEMP\\llvm.zip"
95+
$extract = "$env:RUNNER_TEMP\\extract"
96+
$target = "C:\\clangarm64"
97+
98+
curl -L $url -o $zip
99+
rm -r -fo $extract,$target -ea Ignore
100+
mkdir $extract | Out-Null
101+
102+
tar -xf $zip -C $extract
103+
mv (Get-ChildItem $extract)[0].FullName $target
104+
105+
$b = "$target\\bin"
106+
"CC=$b\\clang.exe" >> $env:GITHUB_ENV
107+
"CXX=$b\\clang++.exe" >> $env:GITHUB_ENV
108+
"CLANGARM64_BIN=$b" >> $env:GITHUB_ENV
109+
"CGO_ENABLED=1" >> $env:GITHUB_ENV
110+
"CLANGARM64_ROOT=$target" >> $env:GITHUB_ENV
111+
$b >> $env:GITHUB_PATH
77112
- uses: actions/setup-go@v4
78113
with:
79114
go-version: ${{ env.GO_VERSION }}
80115
- uses: subosito/flutter-action@v2
81116
with:
82-
flutter-version: ${{ env.FLUTTER_VERSION }}
83-
channel: master
117+
channel: ${{ matrix.flutter_channel || 'stable' }}
118+
flutter-version: ${{ matrix.flutter_version || env.FLUTTER_VERSION }}
84119
- if: runner.os == 'Windows'
85120
run: |
86121
go build -tags nosqlite -ldflags="-w -s" -buildmode=c-shared -o ui/flutter/windows/libgopeed.dll github.com/GopeedLab/gopeed/bind/desktop

0 commit comments

Comments
 (0)