From cbe3a2dd9e7e3d87d53451ff0ffb68d09e06aa08 Mon Sep 17 00:00:00 2001 From: Ilya Zhuravlev Date: Wed, 14 Oct 2020 02:43:03 -0400 Subject: [PATCH] Add github actions --- .github/workflows/main.yml | 88 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..0c53a6e --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,88 @@ +name: CI + +on: + push: + branches: [ main ] + +jobs: + build-linux: + runs-on: ubuntu-16.04 + + steps: + - name: Install dependencies + run: sudo apt-get install libusb-1.0-0-dev libudev-dev + + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: '3.6.x' + + - name: Setup venv + run: | + python -m venv venv + source venv/bin/activate + pip install -r requirements.txt + + - name: Build + run: | + source venv/bin/activate + fbs freeze + cd target + tar cfJ vial-linux.tar.xz Vial + + - uses: actions/upload-artifact@v1 + with: + name: vial-linux + path: target/vial-linux.tar.xz + + build-mac: + runs-on: macos-10.15 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: '3.6.x' + + - name: Setup venv + run: | + python -m venv venv + source venv/bin/activate + pip install -r requirements.txt + + - name: Build + run: | + source venv/bin/activate + fbs freeze + hdiutil create -volname Vial -srcfolder "target/Vial.app" -ov -format UDZO vial-mac.dmg + + - uses: actions/upload-artifact@v1 + with: + name: vial-mac + path: vial-mac.dmg + + build-win: + runs-on: windows-2019 + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v1 + with: + python-version: '3.6.x' + + - name: Setup venv + run: | + python -m venv venv + . .\venv\Scripts\activate.ps1 + pip install -r requirements.txt + + - name: Build + run: | + . .\venv\Scripts\activate.ps1 + fbs freeze + Compress-Archive -Path "target\Vial" -DestinationPath vial-win.zip + + - uses: actions/upload-artifact@v1 + with: + name: vial-win + path: vial-win.zip