fix: ci
This commit is contained in:
parent
e7a8bbd291
commit
0e7975d39c
58
.github/workflows/ci.yml
vendored
58
.github/workflows/ci.yml
vendored
@ -78,7 +78,7 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
case ${{ matrix.job.target }} in
|
case ${{ matrix.job.target }} in
|
||||||
x86_64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev;;
|
x86_64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt install -y g++ gcc git curl wget nasm yasm libgtk-3-dev clang libxcb-randr0-dev libxdo-dev libxfixes-dev libxcb-shape0-dev libxcb-xfixes0-dev libasound2-dev libpulse-dev cmake libclang-dev ninja-build libappindicator3-dev;;
|
||||||
# arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
# arm-unknown-linux-*) sudo apt-get -y update ; sudo apt-get -y install gcc-arm-linux-gnueabihf ;;
|
||||||
# aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
# aarch64-unknown-linux-gnu) sudo apt-get -y update ; sudo apt-get -y install gcc-aarch64-linux-gnu ;;
|
||||||
esac
|
esac
|
||||||
@ -87,9 +87,36 @@ jobs:
|
|||||||
uses: subosito/flutter-action@v2
|
uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
|
|
||||||
|
- name: Install Rust toolchain
|
||||||
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
target: ${{ matrix.job.target }}
|
||||||
|
override: true
|
||||||
|
profile: minimal # minimal component installation (ie, no documentation)
|
||||||
|
|
||||||
- name: Install flutter rust bridge deps
|
- name: Install flutter rust bridge deps
|
||||||
run: |
|
run: |
|
||||||
dart pub global activate ffigen
|
dart pub global activate ffigen --version 5.0.1
|
||||||
|
# flutter_rust_bridge
|
||||||
|
pushd /tmp && git clone https://github.com/SoLongAndThanksForAllThePizza/flutter_rust_bridge --depth=1 && popd
|
||||||
|
pushd /tmp/flutter_rust_bridge/frb_codegen && cargo install --path . && popd
|
||||||
|
pushd flutter && flutter pub get && popd
|
||||||
|
~/.cargo/bin/flutter_rust_bridge_codegen --rust-input ./src/flutter_ffi.rs --dart-output ./flutter/lib/generated_bridge.dart
|
||||||
|
|
||||||
|
- name: Install corrosion
|
||||||
|
run: |
|
||||||
|
mkdir /tmp/corrosion
|
||||||
|
pushd /tmp/corrosion
|
||||||
|
git clone https://github.com/corrosion-rs/corrosion.git
|
||||||
|
# Optionally, specify -DCMAKE_INSTALL_PREFIX=<target-install-path>. You can install Corrosion anyway
|
||||||
|
cmake -Scorrosion -Bbuild -DCMAKE_BUILD_TYPE=Release
|
||||||
|
cmake --build build --config Release
|
||||||
|
# This next step may require sudo or admin privileges if you're installing to a system location,
|
||||||
|
# which is the default.
|
||||||
|
sudo cmake --install build --config Release
|
||||||
|
popd
|
||||||
|
|
||||||
- name: Restore from cache and install vcpkg
|
- name: Restore from cache and install vcpkg
|
||||||
uses: lukka/run-vcpkg@v7
|
uses: lukka/run-vcpkg@v7
|
||||||
@ -102,14 +129,6 @@ jobs:
|
|||||||
$VCPKG_ROOT/vcpkg install libvpx libyuv opus
|
$VCPKG_ROOT/vcpkg install libvpx libyuv opus
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
- name: Install Rust toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
target: ${{ matrix.job.target }}
|
|
||||||
override: true
|
|
||||||
profile: minimal # minimal component installation (ie, no documentation)
|
|
||||||
|
|
||||||
- name: Show version information (Rust, cargo, GCC)
|
- name: Show version information (Rust, cargo, GCC)
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -122,12 +141,19 @@ jobs:
|
|||||||
|
|
||||||
- uses: Swatinem/rust-cache@v1
|
- uses: Swatinem/rust-cache@v1
|
||||||
|
|
||||||
- name: Build
|
# - name: Build
|
||||||
uses: actions-rs/cargo@v1
|
# uses: actions-rs/cargo@v1
|
||||||
with:
|
# with:
|
||||||
use-cross: ${{ matrix.job.use-cross }}
|
# use-cross: ${{ matrix.job.use-cross }}
|
||||||
command: build
|
# command: build
|
||||||
args: --locked --release --target=${{ matrix.job.target }}
|
# args: --locked --release --target=${{ matrix.job.target }} --features flutter -v
|
||||||
|
|
||||||
|
- name: Build Flutter
|
||||||
|
run: |
|
||||||
|
pushd flutter
|
||||||
|
flutter pub get
|
||||||
|
flutter build linux --release -v
|
||||||
|
popd
|
||||||
|
|
||||||
# - name: Strip debug information from executable
|
# - name: Strip debug information from executable
|
||||||
# id: strip
|
# id: strip
|
||||||
|
Loading…
x
Reference in New Issue
Block a user