Skip to content

Commit d9823d7

Browse files
authored
add workflows and examples, fix macos test, make enableVisibility def… (#3)
* add workflows and examples, fix macos test, make enableVisibility defaults to true * add failing examples code * add `WINDIR` and `SYSTEMDRIVE` env vars on windows, add `environment` optional argument for `CMakeBuilder.run` * remove quotes of DCMAKE_C_FLAGS_DEBUG
1 parent 09d935f commit d9823d7

File tree

175 files changed

+5415
-184
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

175 files changed

+5415
-184
lines changed

.fvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"flutter": "3.27.3"
2+
"flutter": "master"
33
}

.github/FUNDING.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# These are supported funding model platforms
2+
3+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
4+
patreon: # Replace with a single Patreon username
5+
open_collective: # Replace with a single Open Collective username
6+
ko_fi: # Replace with a single Ko-fi username
7+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
8+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
9+
liberapay: rainyl
10+
issuehunt: # Replace with a single IssueHunt username
11+
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
12+
polar: # Replace with a single Polar username
13+
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
14+
thanks_dev: # Replace with a single thanks.dev username
15+
custom: ['https://afdian.com/a/rainyl', 'https://paypal.me/rainyliu']
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Desktop (please complete the following information):**
27+
- OS: [e.g. Windows 10]
28+
29+
**Smartphone (please complete the following information):**
30+
- Device: [e.g. Android 11]
31+
- ABI Version [e.g. arm64-v8a]
32+
33+
**Additional context**
34+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/ISSUE_TEMPLATE/question.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
name: Question
3+
about: Ask a Question
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
**Read README carefully first**
11+
**Star :star: this project if you want to ask a question, no star, no answer**
12+
13+
## Question
14+
Describe the question here

.github/dependabot.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: "pub"
9+
directories:
10+
- "/"
11+
12+
schedule:
13+
interval: "weekly"

.github/workflows/examples.yaml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Example
2+
on:
3+
push:
4+
paths-ignore:
5+
- "**.md"
6+
- "LICENSE"
7+
8+
jobs:
9+
windows:
10+
name: windows
11+
runs-on: windows-2019
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: subosito/flutter-action@v2
15+
with:
16+
channel: "master"
17+
- name: run dart-cli example
18+
run: |
19+
cd ${{github.workspace}}\example\dart_cli
20+
dart --enable-experiment=native-assets run
21+
- name: run flutter example
22+
run: |
23+
cd ${{github.workspace}}\example\flutter
24+
flutter config --enable-native-assets
25+
flutter build windows --release
26+
linux:
27+
name: linux
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
- name: setup
32+
run: |
33+
sudo apt-get update
34+
sudo apt-get install -y gcc-aarch64-linux-gnu \
35+
gcc-arm-linux-gnueabihf gcc-i686-linux-gnu \
36+
gcc-riscv64-linux-gnu ninja-build pkg-config \
37+
libgtk-3-dev liblzma-dev \
38+
libstdc++-12-dev
39+
- uses: subosito/flutter-action@v2
40+
with:
41+
channel: "master"
42+
- name: run dart-cli example
43+
run: |
44+
cd "${{github.workspace}}/example/dart_cli"
45+
dart --enable-experiment=native-assets run
46+
- name: run flutter example
47+
run: |
48+
cd "${{github.workspace}}/example/flutter"
49+
flutter config --enable-native-assets
50+
flutter build linux --release
51+
macos:
52+
name: macos
53+
runs-on: macos-latest
54+
steps:
55+
- uses: actions/checkout@v4
56+
- uses: subosito/flutter-action@v2
57+
with:
58+
channel: "master"
59+
- name: run dart-cli example
60+
run: |
61+
cd "${{github.workspace}}/example/dart_cli"
62+
dart --enable-experiment=native-assets run
63+
- name: run flutter example
64+
run: |
65+
cd "${{github.workspace}}/example/flutter"
66+
flutter config --enable-native-assets
67+
flutter build macos --release
68+
ios:
69+
name: ios
70+
runs-on: macos-latest
71+
steps:
72+
- uses: actions/checkout@v4
73+
- uses: subosito/flutter-action@v2
74+
with:
75+
channel: "master"
76+
- name: flutter example
77+
run: |
78+
cd "${{github.workspace}}/example/flutter"
79+
flutter config --enable-native-assets
80+
flutter build ios --release --no-codesign
81+
android:
82+
name: android
83+
runs-on: ubuntu-latest
84+
steps:
85+
- uses: actions/checkout@v4
86+
- name: setup
87+
run: |
88+
sudo apt-get update
89+
sudo apt-get install -y gcc-aarch64-linux-gnu \
90+
gcc-arm-linux-gnueabihf gcc-i686-linux-gnu \
91+
gcc-riscv64-linux-gnu ninja-build
92+
- uses: subosito/flutter-action@v2
93+
with:
94+
channel: "master"
95+
- uses: actions/setup-java@v4
96+
with:
97+
distribution: "temurin"
98+
java-version: "17"
99+
- uses: nttld/setup-ndk@v1
100+
id: setup-ndk
101+
with:
102+
ndk-version: r27c
103+
add-to-path: true
104+
- name: flutter example
105+
run: |
106+
cd "${{github.workspace}}/example/flutter"
107+
flutter config --enable-native-assets
108+
flutter build apk --release

.github/workflows/formatter.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
on:
2+
push:
3+
4+
name: Format Code
5+
6+
jobs:
7+
build:
8+
name: format code
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout code
12+
uses: actions/checkout@v2
13+
- name: Set up Flutter
14+
uses: subosito/flutter-action@v2
15+
with:
16+
channel: "master"
17+
- name: Format code
18+
run: |
19+
dart format
20+
- name: Commit changes
21+
uses: stefanzweifel/git-auto-commit-action@v5
22+
with:
23+
commit_message: "dart format ✅"
24+
branch: ${{ github.head_ref }}

.github/workflows/test_publish.yml

Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
name: test publish to pub.dev and release
2+
3+
on:
4+
push:
5+
# tags:
6+
# - 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v{{version}'
7+
8+
jobs:
9+
test-linux:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
- name: setup
14+
run: |
15+
sudo apt-get update
16+
sudo apt-get install -y gcc-aarch64-linux-gnu \
17+
gcc-arm-linux-gnueabihf gcc-i686-linux-gnu \
18+
gcc-riscv64-linux-gnu ninja-build
19+
- uses: nttld/setup-ndk@v1
20+
id: setup-ndk
21+
with:
22+
ndk-version: r27c
23+
add-to-path: true
24+
- uses: subosito/flutter-action@v2
25+
with:
26+
channel: "master"
27+
- name: test
28+
run: |
29+
cd "${{github.workspace}}"
30+
dart test
31+
test-windows:
32+
runs-on: windows-latest
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: setup
36+
run: |
37+
choco install ninja
38+
- uses: nttld/setup-ndk@v1
39+
id: setup-ndk
40+
with:
41+
ndk-version: r27c
42+
add-to-path: true
43+
- uses: subosito/flutter-action@v2
44+
with:
45+
channel: "master"
46+
- name: test
47+
run: |
48+
cd "${{github.workspace}}"
49+
dart test
50+
test-macos:
51+
runs-on: macos-latest
52+
steps:
53+
- uses: actions/checkout@v4
54+
- name: setup
55+
run: |
56+
brew install ninja
57+
- uses: nttld/setup-ndk@v1
58+
id: setup-ndk
59+
with:
60+
ndk-version: r27c
61+
add-to-path: true
62+
- uses: subosito/flutter-action@v2
63+
with:
64+
channel: "master"
65+
- name: test
66+
run: |
67+
cd "${{github.workspace}}"
68+
dart test
69+
publish:
70+
name: Publish
71+
if: startsWith(github.ref, 'refs/tags/v')
72+
needs: [test-linux, test-windows, test-macos]
73+
permissions:
74+
id-token: write # Required for authentication using OIDC
75+
runs-on: ubuntu-latest
76+
environment: pub.dev
77+
steps:
78+
- uses: actions/checkout@v4
79+
- uses: dart-lang/setup-dart@v1
80+
- name: Install dependencies
81+
run: dart pub get
82+
- name: Publish
83+
run: dart pub publish --force
84+
85+
release:
86+
name: Release
87+
if: startsWith(github.ref, 'refs/tags/v')
88+
needs: [test-linux, test-windows, test-macos, publish]
89+
runs-on: ubuntu-latest
90+
steps:
91+
- name: checkout
92+
uses: actions/checkout@v4
93+
- name: release
94+
uses: softprops/action-gh-release@v1
95+
with:
96+
draft: false
97+
prerelease: false
98+
generate_release_notes: true

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# See https://www.dartlang.org/guides/libraries/private-files
22

3+
# custom
4+
.bak/
5+
36
# Files and directories created by pub
47
.dart_tool/
58
.packages
@@ -29,4 +32,4 @@ doc/api/
2932
.flutter-plugins-dependencies
3033

3134
# FVM Version Cache
32-
.fvm/
35+
.fvm/

0 commit comments

Comments
 (0)