|
| 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 |
0 commit comments