yubioath-flutter/.github/workflows/linux.yml

59 lines
1.3 KiB
YAML
Raw Normal View History

2021-11-19 11:22:27 +03:00
name: Linux
on: [push, pull_request]
jobs:
build:
2021-12-07 17:53:08 +03:00
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-18.04, ubuntu-latest]
2021-11-19 11:22:27 +03:00
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -qq swig libpcsclite-dev clang cmake ninja-build pkg-config libgtk-3-dev
python -m pip install --upgrade pip
pip install poetry
- uses: subosito/flutter-action@v2
2021-11-19 11:22:27 +03:00
with:
channel: 'beta'
- run: flutter config --enable-linux-desktop
- run: flutter --version
2021-11-19 12:23:01 +03:00
- name: Run tests
run: |
flutter test
flutter analyze
2021-11-19 12:23:01 +03:00
2021-11-19 11:22:27 +03:00
- name: Install ykman
2021-11-19 12:23:01 +03:00
run: ./build-ykman.sh
2021-11-19 11:22:27 +03:00
- name: Build the app
2021-11-19 12:23:01 +03:00
run: flutter build linux
2021-11-19 11:22:27 +03:00
- name: Check generated files
run: git diff --exit-code
2021-11-19 11:22:27 +03:00
- name: Rename and archive app
run: |
export REF=$(echo ${GITHUB_REF} | cut -d '/' -f 3)
mkdir deploy
tar -czf deploy/yubioath-desktop-${REF}-linux-${{matrix.os}}.tar.gz -C build/linux/x64/release/bundle .
2021-11-19 11:22:27 +03:00
- name: Upload artifact
uses: actions/upload-artifact@v1
with:
name: yubioath-desktop-linux
path: deploy