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
|
|
|
|
|
2022-04-27 15:36:32 +03:00
|
|
|
- uses: subosito/flutter-action@v3
|
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
|
2021-11-19 13:20:57 +03:00
|
|
|
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
|
|
|
|
2022-04-04 16:43:04 +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
|
2021-12-14 17:06:04 +03:00
|
|
|
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
|