Skip to content

theme: add success color #202

theme: add success color

theme: add success color #202

Workflow file for this run

name: Flutter CI
on: [push, pull_request]
jobs:
static-analysis:
name: Static analysis
runs-on: ubuntu-latest
steps:
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
- uses: actions/checkout@v3
with:
submodules: true
- run: |
for PKG in native network core; do
(cd meesign_$PKG; dart pub get)
done
flutter pub get
- run: flutter analyze --no-fatal-infos
- run: dart format --output none --set-exit-if-changed .
dart-test:
name: Dart test
runs-on: ubuntu-latest
steps:
- uses: dart-lang/setup-dart@v1
- uses: actions/checkout@v3
with:
submodules: true
- name: Install protoc
uses: arduino/setup-protoc@v2
with:
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pdfsig
run: sudo apt-get install -y poppler-utils
- name: Install native
run: |
cargo build --release
echo "LD_LIBRARY_PATH=$(pwd)/target/release/" >> "$GITHUB_ENV"
working-directory: meesign_native/native/meesign-crypto
- name: Setup server
run: |
wget https://raw.githubusercontent.com/crocs-muni/meesign-server/main/generate_keys.sh
bash generate_keys.sh
chmod a+r keys/*
podman pull crocsmuni/meesign:nightly
podman run --detach \
--publish 1337:1337 --volume $(pwd)/keys/:/meesign/keys/:Z \
crocsmuni/meesign:nightly
- name: Run tests
run: cd meesign_core; dart test
build:
name: ${{ matrix.target }} build
runs-on: ${{ matrix.os }}
strategy:
matrix:
target: [Windows, Linux, Android]
include:
- os: windows-latest
target: Windows
build_target: windows
build_path: build\windows\x64\runner\Release
asset_extension: .zip
asset_content_type: application/zip
toolchain_file: C:\vcpkg\scripts\buildsystems\vcpkg.cmake
- os: ubuntu-latest
target: Linux
build_target: linux
build_path: build/linux/x64/release/bundle
asset_extension: .tar.gz
asset_content_type: application/gzip
- os: ubuntu-latest
target: Android
build_target: apk
build_path: build/app/outputs/flutter-apk
asset_extension: .apk
asset_content_type: application/vnd.android.package-archive
# Disable fail-fast as we want results from all even if one fails.
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
submodules: true
- name: Install protoc
uses: arduino/setup-protoc@v2
with:
version: "23.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Clone Flutter repository with stable channel
uses: subosito/flutter-action@v2
with:
channel: stable
cache: true
- name: Install Android dependencies
if: matrix.target == 'Android'
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Set up Rust for Android
if: matrix.target == 'Android'
env:
ANDROID_NDK_HOME: /usr/local/lib/android/sdk/ndk/25.2.9519653
ANDROID_API: 33
# add rust android targets,
# point cargo to local Android NDK installation
run: |
rustup target add \
aarch64-linux-android \
armv7-linux-androideabi \
x86_64-linux-android \
i686-linux-android
bash ./tool/cargo-config-gen-android.sh >> ~/.cargo/config.toml
cat ~/.cargo/config.toml
- name: Install Linux dependencies
if: matrix.target == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y \
libgtk-3-dev libx11-dev libblkid-dev \
pkg-config cmake ninja-build
- name: Cache Vcpkg packages
uses: actions/cache@v3
if: matrix.target == 'Windows'
with:
path: C:\vcpkg
key: vcpkg-root
- name: Install Windows dependencies
if: matrix.target == 'Windows'
env:
VCPKG_DEFAULT_TRIPLET: x64-windows-static-md
run: |
vcpkg install openssl
- name: Enable desktop support
if: matrix.target != 'Android'
run: |
flutter config --enable-linux-desktop
flutter config --enable-windows-desktop
# Fetch dart packages
- run: flutter pub get
- name: Build app
env:
CMAKE_TOOLCHAIN_FILE: ${{ matrix.toolchain_file }}
# env vars used by rust openssl
VCPKG_ROOT: C:\vcpkg
# needed to fetch Android deps (podofo + freetype AARs)
USERNAME: ${{ github.actor }}
TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
flutter build -v ${{ matrix.build_target }}
--release
--dart-define=ALLOW_BAD_CERTS=true
# Package the build.
- name: Copy VC redistributables to release directory for Windows
if: matrix.target == 'Windows'
run: |
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\msvcp140.dll') .
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140.dll') .
Copy-Item (vswhere -latest -find 'VC\Redist\MSVC\*\x64\*\vcruntime140_1.dll') .
working-directory: ${{ matrix.build_path }}
- name: Rename build for Android
if: matrix.target == 'Android'
run: mv app-release.apk $GITHUB_WORKSPACE/meesign_client_${{ matrix.target }}.apk
working-directory: ${{ matrix.build_path }}
- name: Compress build for Linux
if: matrix.target == 'Linux'
run: tar czf $GITHUB_WORKSPACE/meesign_client_${{ matrix.target }}.tar.gz *
working-directory: ${{ matrix.build_path }}
- name: Compress build for Windows
if: matrix.target == 'Windows'
run: compress-archive -Path * -DestinationPath ${env:GITHUB_WORKSPACE}\meesign_client_${{ matrix.target }}.zip
working-directory: ${{ matrix.build_path }}
# Upload the build.
- name: Upload build outputs
uses: actions/upload-artifact@v3
with:
name: meesign_client_${{ matrix.target }}${{ matrix.asset_extension }}
path: ./meesign_client_${{ matrix.target }}${{ matrix.asset_extension }}
retention-days: 10