Bugfixes/1.3 #316
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: | |
branches: | |
- "*" | |
jobs: | |
build-v2: | |
runs-on: macos-12 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Setup Xcode version | |
uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: latest-stable | |
- name: Set variables | |
run: | | |
HASH=$(cat SNAPSHOT_HASH) | |
echo "SNAPSHOT_HASH=$HASH" >> $GITHUB_ENV | |
- name: Install tools | |
run: | | |
brew install ninja libusbmuxd ideviceinstaller ios-deploy [email protected] | |
sudo rm -rf /usr/local/bin/python3 | |
sudo ln -s /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 /usr/local/bin/python3 | |
python3 -m pip install wheel | |
python3 -m pip install . | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
git clone https://github.com/flutter/engine.git | |
- name: gclient sync | |
run: | | |
ROOT_DIR=`pwd` | |
export PATH=$PATH:$ROOT_DIR/depot_tools:/Library/Frameworks/Python.framework/Versions/3.11/bin | |
cd engine | |
git config --global user.email "[email protected]" && git config --global user.name "reflutter" | |
git fetch origin $(reflutter ${{env.SNAPSHOT_HASH}} -l) | |
git reset --hard FETCH_HEAD | |
reflutter ${{env.SNAPSHOT_HASH}} -l | |
echo 'reflutter' > REFLUTTER | |
git add . && git commit -am "reflutter" | |
cd $ROOT_DIR | |
mkdir customEngine | |
cd customEngine | |
echo 'solutions = [{"managed": False,"name": "src/flutter","url": "'$ROOT_DIR/engine'","custom_deps": {},"deps_file": "DEPS","safesync_url": "",},]' > .gclient | |
gclient sync | |
reflutter ${{env.SNAPSHOT_HASH}} -l | |
- name: ninja build Flutter.framework | |
run: export PATH=$PATH:`pwd`/depot_tools && sudo xcode-select -s /Applications/Xcode.app && customEngine/src/flutter/tools/gn --no-goma --ios --runtime-mode=release && ninja -C customEngine/src/out/ios_release | |
- name: ninja build libflutter_arm64 | |
run: export PATH=$PATH:`pwd`/depot_tools && customEngine/src/flutter/tools/gn --no-goma --android --android-cpu=arm64 --runtime-mode=release && ninja -C customEngine/src/out/android_release_arm64 | |
- name: ninja build libflutter_arm | |
run: export PATH=$PATH:`pwd`/depot_tools && customEngine/src/flutter/tools/gn --no-goma --android --android-cpu=arm --runtime-mode=release && ninja -C customEngine/src/out/android_release | |
- name: Move to release | |
run: | | |
cp customEngine/src/out/ios_release/Flutter.framework/Flutter Flutter | |
cp customEngine/src/out/android_release_arm64/lib.stripped/libflutter.so libflutter_arm64.so 2>/dev/null || : | |
cp customEngine/src/out/android_release/lib.stripped/libflutter.so libflutter_arm.so 2>/dev/null || : | |
- name: iOS-Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ios-v2-${{env.SNAPSHOT_HASH}} | |
files: | | |
./Flutter | |
- name: Android-Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: android-v2-${{env.SNAPSHOT_HASH}} | |
files: | | |
./*.so | |
build-v3: | |
runs-on: macos-12 | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v2 | |
- name: Setup Xcode version | |
uses: maxim-lobanov/[email protected] | |
with: | |
xcode-version: latest-stable | |
- name: Set variables | |
run: | | |
HASH=$(cat SNAPSHOT_HASH) | |
echo "SNAPSHOT_HASH=$HASH" >> $GITHUB_ENV | |
- name: Install tools | |
run: | | |
brew install ninja libusbmuxd ideviceinstaller ios-deploy [email protected] | |
sudo rm -rf /usr/local/bin/python3 | |
sudo ln -s /Library/Frameworks/Python.framework/Versions/3.11/bin/python3 /usr/local/bin/python3 | |
python3 -m pip install wheel | |
python3 -m pip install . | |
git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git | |
git clone https://github.com/flutter/engine.git | |
- name: gclient sync | |
run: | | |
ROOT_DIR=`pwd` | |
export PATH=$PATH:$ROOT_DIR/depot_tools:/Library/Frameworks/Python.framework/Versions/3.11/bin | |
cd engine | |
git config --global user.email "[email protected]" && git config --global user.name "reflutter" | |
git fetch origin $(reflutter ${{env.SNAPSHOT_HASH}} -l) | |
git reset --hard FETCH_HEAD | |
reflutter ${{env.SNAPSHOT_HASH}} -l patchDump | |
echo 'reflutter' > REFLUTTER | |
git add . && git commit -am "reflutter" | |
cd $ROOT_DIR | |
mkdir customEngine | |
cd customEngine | |
echo 'solutions = [{"managed": False,"name": "src/flutter","url": "'$ROOT_DIR/engine'","custom_deps": {},"deps_file": "DEPS","safesync_url": "",},]' > .gclient | |
gclient sync | |
reflutter ${{env.SNAPSHOT_HASH}} -l patchDump | |
- name: ninja build Flutter.framework | |
run: export PATH=$PATH:`pwd`/depot_tools && sudo xcode-select -s /Applications/Xcode.app && customEngine/src/flutter/tools/gn --no-goma --ios --runtime-mode=release && ninja -C customEngine/src/out/ios_release | |
- name: ninja build libflutter_arm64 | |
run: export PATH=$PATH:`pwd`/depot_tools && customEngine/src/flutter/tools/gn --no-goma --android --android-cpu=arm64 --runtime-mode=release && ninja -C customEngine/src/out/android_release_arm64 | |
- name: ninja build libflutter_arm | |
run: export PATH=$PATH:`pwd`/depot_tools && customEngine/src/flutter/tools/gn --no-goma --android --android-cpu=arm --runtime-mode=release && ninja -C customEngine/src/out/android_release | |
- name: Move to release | |
run: | | |
cp customEngine/src/out/ios_release/Flutter.framework/Flutter Flutter | |
cp customEngine/src/out/android_release_arm64/lib.stripped/libflutter.so libflutter_arm64.so 2>/dev/null || : | |
cp customEngine/src/out/android_release/lib.stripped/libflutter.so libflutter_arm.so 2>/dev/null || : | |
- name: iOS-Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: ios-v3-${{env.SNAPSHOT_HASH}} | |
files: | | |
./Flutter | |
- name: Android-Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
tag_name: android-v3-${{env.SNAPSHOT_HASH}} | |
files: | | |
./*.so | |