mirror of
https://github.com/Yubico/yubioath-flutter.git
synced 2024-11-22 16:32:01 +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]
|
on: [push, pull_request]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
helper:
|
build:
|
||||||
name: Build helper
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
env:
|
env:
|
||||||
PYVER: 3.11
|
PYVER: 3.11
|
||||||
|
FLUTTER: '3.3.9'
|
||||||
container:
|
container:
|
||||||
image: ubuntu:18.04
|
image: ubuntu:18.04
|
||||||
env:
|
env:
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
steps:
|
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
|
- name: Install dependencies
|
||||||
if: steps.cache-helper.outputs.cache-hit != 'true'
|
|
||||||
run: |
|
run: |
|
||||||
apt-get update
|
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
|
add-apt-repository -y ppa:deadsnakes/ppa
|
||||||
apt-get install -qq python$PYVER-dev python$PYVER-venv
|
apt-get install -qq git python$PYVER-dev python$PYVER-venv
|
||||||
python$PYVER -m ensurepip --user
|
git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||||
python$PYVER -m pip install -U pip
|
ln -s `which python$PYVER` /usr/local/bin/python
|
||||||
python$PYVER -m pip install poetry
|
|
||||||
|
|
||||||
- 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
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Check app versions
|
- name: Check app versions
|
||||||
@ -61,26 +32,41 @@ jobs:
|
|||||||
python set-version.py
|
python set-version.py
|
||||||
git diff --exit-code
|
git diff --exit-code
|
||||||
|
|
||||||
- name: Download helper
|
- name: Cache helper
|
||||||
uses: actions/download-artifact@v3
|
id: cache-helper
|
||||||
|
uses: actions/cache@v3
|
||||||
with:
|
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: |
|
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: |
|
run: |
|
||||||
sudo apt-get update
|
apt-get install -qq clang cmake ninja-build pkg-config libgtk-3-dev jq
|
||||||
sudo apt-get install -qq clang cmake ninja-build pkg-config libgtk-3-dev
|
|
||||||
|
|
||||||
- uses: subosito/flutter-action@v2
|
- uses: subosito/flutter-action@v2
|
||||||
with:
|
with:
|
||||||
channel: 'stable'
|
channel: 'stable'
|
||||||
flutter-version: '3.3.9'
|
flutter-version: ${{ env.FLUTTER }}
|
||||||
- run: flutter config --enable-linux-desktop
|
|
||||||
- run: flutter --version
|
- 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
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
|
Loading…
Reference in New Issue
Block a user