diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 84e359d0..51c973ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -290,6 +290,66 @@ jobs: parallel: true flag-name: "flutter" + flutter-linux-release: + #needs: [flutter-analyze, flutter-format, flutter-test] + name: Relase frontend for Linux + runs-on: ubuntu-latest + env: + CMAKE_C_COMPILER_LAUNCHER: "" + CMAKE_CXX_COMPILER_LAUNCHER: "" + defaults: + run: + working-directory: + frontend + steps: + - uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + channel: ${{ env.FLUTTER_CHANNEL }} + cache: true + cache-key: ${{ github.job }} + + - name: Install flutter dependencies + run: | + sudo apt-get update -y + sudo apt-get install -y ninja-build libgtk-3-dev + flutter doctor -v + + - name: Flutter pub cache + uses: actions/cache@v2 + with: + path: ${{ env.PUB_CACHE }} + key: flutter-pub-${{ github.job }}-${{ hashFiles('**/pubspec.lock') }} + restore-keys: | + flutter-pub-${{ github.job }}- + + - run: flutter pub get + + - name: Generate code + run: flutter pub run build_runner build + + - name: Build + run: flutter build linux + + - name: Create AppImage + uses: docker://appimagecrafters/appimage-builder:1.1.0 + with: + entrypoint: bash + args: "-c 'cd frontend; appimage-builder --recipe AppImageBuilder.yml --skip-test'" + + - run: ls -la + - run: ls -la frontend + + - uses: actions/upload-artifact@v3 + with: + name: frontend-appimage + path: frontend/ShrapnelDSP-latest-x86_64.AppImage + coveralls-finish: needs: [flutter-test, ctest] runs-on: ubuntu-latest diff --git a/frontend/.gitignore b/frontend/.gitignore index 8d93255f..68007bee 100644 --- a/frontend/.gitignore +++ b/frontend/.gitignore @@ -46,3 +46,8 @@ app.*.map.json /android/app/debug /android/app/profile /android/app/release + +# AppImage +*.AppImage* +AppDir +appimage-build diff --git a/frontend/AppImageBuilder.yml b/frontend/AppImageBuilder.yml new file mode 100644 index 00000000..7b4493da --- /dev/null +++ b/frontend/AppImageBuilder.yml @@ -0,0 +1,57 @@ +# appimage-builder recipe see https://appimage-builder.readthedocs.io for details +version: 1 +script: + - rm -rf AppDir || true + - cp -r build/linux/x64/release/bundle AppDir + - mkdir -p AppDir/usr/share/icons + - cp web/icons/Icon-192.png AppDir/usr/share/icons +AppDir: + path: ./AppDir + app_info: + id: com.example.app + name: ShrapnelDSP + icon: Icon-192 + version: latest + exec: shrapnel + exec_args: $@ + apt: + arch: + - amd64 + allow_unauthenticated: true + sources: + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse + - sourceline: deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse + - sourceline: deb http://security.ubuntu.com/ubuntu/ jammy-security main restricted universe multiverse + include: + - libgtk-3-0 + - libwayland-client0 + - libwayland-cursor0 + - libwayland-egl1 + files: + include: [] + exclude: + - usr/share/man + - usr/share/doc/*/README.* + - usr/share/doc/*/changelog.* + - usr/share/doc/*/NEWS.* + - usr/share/doc/*/TODO.* + test: + fedora-30: + image: appimagecrafters/tests-env:fedora-30 + command: ./AppRun + debian-stable: + image: appimagecrafters/tests-env:debian-stable + command: ./AppRun + archlinux-latest: + image: appimagecrafters/tests-env:archlinux-latest + command: ./AppRun + centos-7: + image: appimagecrafters/tests-env:centos-7 + command: ./AppRun + ubuntu-xenial: + image: appimagecrafters/tests-env:ubuntu-xenial + command: ./AppRun +AppImage: + arch: x86_64 + update-information: guess