Skip to content

Fix entitlements

Fix entitlements #53

Workflow file for this run

name: Build linux
on:
push:
workflow_dispatch:
merge_group:
jobs:
macos-build:
runs-on: macos-latest
steps:
- uses: actions/checkout@main
- name: Set up Flutter
uses: subosito/flutter-action@main
- name: Podfile
run: |
cd macos
rm Podfile.lock
flutter clean
flutter pub get
pod install
pod update
- name: Build
run: |
flutter build macos
mkdir -p target
cp -R build/macos/Build/Products/Release/rdr2_session.app target/
sudo chmod +x target/rdr2_session.app/Contents/MacOS/rdr2_session
- uses: QQxiaoming/create-dmg-action@v0.0.2
with:
name: rdr2_session_macos_x64.dmg
srcdir: target
- name: Save build Artifact
uses: actions/upload-artifact@main
with:
name: rdr2_session_macos_x64.app
path: |
*.dmg
windows-build:
runs-on: windows-latest
steps:
- uses: actions/checkout@main
- name: Set up Flutter
uses: subosito/flutter-action@main
- name: Build
run: |
flutter build windows
- name: Save build Artifact
uses: actions/upload-artifact@main
with:
name: rdr2_session_windows_x64
path: |
build\windows\x64\runner\Release\*
# https://github.com/AppImageCrafters/appimage-builder-flutter-example/blob/main/.github/workflows/appimage.yml
linux-build:
runs-on: ubuntu-20.04
strategy:
matrix:
include:
# - arch: armv7
# distro: ubuntu20.04
# - arch: aarch64
# distro: ubuntu20.04
- arch: x86_64
distro: ubuntu20.04
steps:
- uses: actions/checkout@main
- uses: subosito/flutter-action@main
if: ${{ matrix.arch == 'x86_64' }}
# with:
# flutter-version: '1.22.4'
# - run: flutter channel beta
# - run: flutter upgrade
- name: flutter config --enable-linux-desktop on host
run: flutter config --enable-linux-desktop
if: ${{ matrix.arch == 'x86_64' }}
- name: "Install dependencies"
if: ${{ matrix.arch == 'x86_64' }}
run: |
sudo apt-get update
sudo apt-get install -y cmake ninja-build build-essential pkg-config curl file git unzip xz-utils zip libgtk-3-dev
- run: echo ${{ github.event.repository.name }}
- name: Build for linux/${{ matrix.arch }} using uraimo/run-on-arch-action
if: ${{ matrix.arch != 'x86_64' }}
uses: uraimo/run-on-arch-action@master
with:
arch: ${{ matrix.arch }}
distro: ${{ matrix.distro }}
# https://github.com/uraimo/run-on-arch-action/issues/34
setup: |
mkdir -p "${PWD}/build"
dockerRunArgs: |
--volume "${PWD}/build:/home/${USER}/${{ github.event.repository.name }}/${{ github.event.repository.name }}/build"
run: |
apt-get update > /dev/null
apt-get install -y clang cmake ninja-build build-essential pkg-config curl wget file git unzip xz-utils zip libgtk-3-dev > /dev/null
bash << EOF
if [ "${{ matrix.arch }}" == "aarch64" ];then
git clone https://github.com/flutter/flutter.git
export PATH=$PATH:$(pwd)/flutter/bin
flutter doctor -v
flutter config --enable-linux-desktop
python preprocess-linux.py
flutter build linux
find ./build/linux/*/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/*/release/bundle/lib/ \;
fi
EOF
- name: Build for linux/${{ matrix.arch }} on host
if: ${{ matrix.arch == 'x86_64' }}
run: |
git clone https://github.com/flutter/flutter.git
export PATH=$PATH:$(pwd)/flutter/bin
flutter doctor -v
echo flutter build linux
flutter build linux
find ./build -type f -name '*.so'
find ./build/linux/*/release/plugins -type f -name '*.so' -exec cp {} ./build/linux/*/release/bundle/lib/ \; || true
find ./build -type f -name '*.so'
- run: find ./build -type f -name '*.so'
- name: Build AppImage unsing appimage-builder
uses: docker://appimagecrafters/appimage-builder:0.8.5
with:
entrypoint: appimage-builder
args: --recipe ./AppImageBuilder-${{ matrix.arch }}.yml --skip-test
- name: Save build Artifact
uses: actions/upload-artifact@main
with:
name: rdr2_session.AppImage
path: './*.AppImage*'