mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 08:22:16 +03:00
Merge PR #868.
This commit is contained in:
commit
992cb79d56
82
.github/workflows/linux.yml
vendored
82
.github/workflows/linux.yml
vendored
@ -3,57 +3,28 @@ name: Linux
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
helper:
|
||||
name: Build helper
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
PYVER: 3.11
|
||||
FLUTTER: '3.3.9'
|
||||
container:
|
||||
image: ubuntu:18.04
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Cache helper
|
||||
id: cache-helper
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: helper.tar.gz
|
||||
key: ${{ runner.os }}-py${{ env.PYVER }}-${{ hashFiles('helper/**') }}
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.cache-helper.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
apt-get update
|
||||
apt-get install -qq swig libpcsclite-dev software-properties-common build-essential cmake git
|
||||
apt-get install -qq software-properties-common
|
||||
add-apt-repository -y ppa:git-core/ppa
|
||||
add-apt-repository -y ppa:deadsnakes/ppa
|
||||
apt-get install -qq python$PYVER-dev python$PYVER-venv
|
||||
python$PYVER -m ensurepip --user
|
||||
python$PYVER -m pip install -U pip
|
||||
python$PYVER -m pip install poetry
|
||||
apt-get install -qq git python$PYVER-dev python$PYVER-venv
|
||||
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
ln -s `which python$PYVER` /usr/local/bin/python
|
||||
|
||||
- name: Build the Helper
|
||||
if: steps.cache-helper.outputs.cache-hit != 'true'
|
||||
run: ./build-helper.sh
|
||||
|
||||
- name: Create archive
|
||||
if: steps.cache-helper.outputs.cache-hit != 'true'
|
||||
run: tar -czf helper.tar.gz build/linux/helper assets/licenses/helper.json
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: helper
|
||||
path: helper.tar.gz
|
||||
|
||||
build:
|
||||
name: Build app
|
||||
runs-on: ubuntu-latest
|
||||
needs: helper
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Check app versions
|
||||
@ -61,26 +32,41 @@ jobs:
|
||||
python set-version.py
|
||||
git diff --exit-code
|
||||
|
||||
- name: Download helper
|
||||
uses: actions/download-artifact@v3
|
||||
- name: Cache helper
|
||||
id: cache-helper
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
name: helper
|
||||
path: |
|
||||
build/linux/helper
|
||||
assets/licenses/helper.json
|
||||
key: ${{ runner.os }}-py${{ env.PYVER }}-${{ hashFiles('helper/**') }}
|
||||
|
||||
- name: Unpack helper
|
||||
- name: Install helper dependencies
|
||||
if: steps.cache-helper.outputs.cache-hit != 'true'
|
||||
run: |
|
||||
tar -xf helper.tar.gz
|
||||
apt-get install -qq swig libpcsclite-dev build-essential cmake
|
||||
python -m ensurepip --user
|
||||
python -m pip install -U pip
|
||||
python -m pip install poetry
|
||||
|
||||
- name: Install dependencies
|
||||
- name: Build the Helper
|
||||
if: steps.cache-helper.outputs.cache-hit != 'true'
|
||||
run: ./build-helper.sh
|
||||
|
||||
- name: Install Flutter dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -qq clang cmake ninja-build pkg-config libgtk-3-dev
|
||||
apt-get install -qq clang cmake ninja-build pkg-config libgtk-3-dev jq
|
||||
|
||||
- uses: subosito/flutter-action@v2
|
||||
with:
|
||||
channel: 'stable'
|
||||
flutter-version: '3.3.9'
|
||||
- run: flutter config --enable-linux-desktop
|
||||
- run: flutter --version
|
||||
flutter-version: ${{ env.FLUTTER }}
|
||||
|
||||
- name: Configure Flutter
|
||||
run: |
|
||||
git config --global --add safe.directory /opt/hostedtoolcache/flutter/stable-$FLUTTER-x64
|
||||
flutter config --enable-linux-desktop
|
||||
flutter --version
|
||||
|
||||
- name: Run tests
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user