Skip to content

Commit

Permalink
Merge pull request #1430 from krille-chan/krille/release-linux-arm64
Browse files Browse the repository at this point in the history
build: Also build for arm64 for linux releases
  • Loading branch information
krille-chan authored Oct 26, 2024
2 parents 85c4271 + 6177445 commit 2158e8d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 14 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/integrate.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ jobs:
build_debug_linux:
strategy:
matrix:
os: [ubuntu-latest, self-hosted]
runs-on: ${{ matrix.os }}
arch: [ x64, arm64 ]
runs-on: ${{ matrix.arch == 'arm64' && 'self-hosted' || 'ubuntu-latest'}}
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
Expand All @@ -73,7 +73,7 @@ jobs:
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
./flutter/bin/flutter doctor
- run: ./flutter/bin/flutter pub get
- run: ./flutter/bin/flutter build linux
- run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}

build_debug_ios:
runs-on: macos-latest
Expand Down
25 changes: 14 additions & 11 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,28 +104,31 @@ jobs:
asset_content_type: application/vnd.android.package-archive

build_linux:
runs-on: ubuntu-latest
strategy:
matrix:
arch: [ x64, arm64 ]
runs-on: ${{ matrix.arch == 'arm64' && 'self-hosted' || 'ubuntu-latest'}}
steps:
- uses: actions/checkout@v4
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
cache: true
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev -y
- run: flutter pub get
- run: flutter build linux --release --target-platform linux-x64
run: sudo apt-get update && sudo apt-get install curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev libwebkit2gtk-4.1-dev -y
- name: Install Flutter
run: |
git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
./flutter/bin/flutter doctor
- run: ./flutter/bin/flutter pub get
- run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}
- name: Create archive
run: tar -czf fluffychat-linux-x64.tar.gz -C build/linux/x64/release/bundle/ .
run: tar -czf fluffychat-linux-${{ matrix.arch }}.tar.gz -C build/linux/${{ matrix.arch }}/release/bundle/ .
- name: Upload to release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.PAGES_DEPLOY_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: fluffychat-linux-x64.tar.gz
asset_name: fluffychat-linux-x64.tar.gz
asset_path: fluffychat-linux-${{ matrix.arch }}.tar.gz
asset_name: fluffychat-linux-${{ matrix.arch }}.tar.gz
asset_content_type: application/gzip

deploy_playstore:
Expand Down

0 comments on commit 2158e8d

Please sign in to comment.