build using Py3.8 and test across more OSs (#506)

* build using Py3.8 and test across more OSs

* enable for release

* test builds on push to master
This commit is contained in:
Moritz
2021-04-13 15:42:58 +02:00
committed by GitHub
parent a11d04e92b
commit 3023634536
2 changed files with 42 additions and 5 deletions

View File

@@ -1,6 +1,8 @@
name: build
on:
push:
branches: [master]
release:
types: [edited, published]
@@ -26,10 +28,11 @@ jobs:
uses: actions/checkout@v2
with:
submodules: true
- name: Set up Python 3.9
# using Python 3.8 to support running across multiple operating systems including Windows 7
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: 3.8
- if: matrix.os == 'ubuntu-16.04'
run: sudo apt-get install -y libyaml-dev
- name: Install PyInstaller
@@ -45,10 +48,42 @@ jobs:
name: ${{ matrix.asset_name }}
path: dist/${{ matrix.artifact_name }}
zip:
name: zip ${{ matrix.asset_name }}
test_run:
# test that binaries run on push to master
if: github.event_name == 'push'
name: Test run on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
needs: [build]
strategy:
matrix:
include:
# OSs not already tested above
- os: ubuntu-18.04
artifact_name: capa
asset_name: linux
- os: ubuntu-20.04
artifact_name: capa
asset_name: linux
- os: windows-2016
artifact_name: capa.exe
asset_name: windows
steps:
- name: Download ${{ matrix.asset_name }}
uses: actions/download-artifact@v2
with:
name: ${{ matrix.asset_name }}
- name: Set executable flag
if: matrix.os != 'windows-2016'
run: chmod +x ${{ matrix.artifact_name }}
- name: Run capa
run: ./${{ matrix.artifact_name }} -h
zip_and_upload:
# upload zipped binaries to Release page
if: github.event_name == 'release'
name: zip and upload ${{ matrix.asset_name }}
runs-on: ubuntu-20.04
needs: build
needs: [build]
strategy:
matrix:
include: