-
Notifications
You must be signed in to change notification settings - Fork 612
build using Py3.8 and test across more OSs #506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I do not really like to test this in the build workflow. I mean, we release and if any OS fails we don't upload any binary. It would be better to test this before releasing. What about adding a test build workflow which is run in master (which should be green before releasing) and removing it from here? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hm, how can we do this on a per-case basis? maybe via a specific activity type https://docs.github.com/en/actions/reference/events-that-trigger-workflows#release? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What do you mean? running it only on a release PR? My proposal was to create a
alternatively we could test it on every PR There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of duplicating steps in a new workflow file my new proposal uses |
||
# 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 | ||
asse 8000 t_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' | ||
Ana06 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
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' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. do this only for release events |
||
name: zip and upload ${{ matrix.asset_name }} | ||
runs-on: ubuntu-20.04 | ||
needs: build | ||
needs: [build] | ||
strategy: | ||
matrix: | ||
include: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good comment