-
-
Notifications
You must be signed in to change notification settings - Fork 4.4k
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
Move x86 tests from Travis to GHA, add aarch64 wheel build to Travis #3026
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
c1c457a
Move Travis x86 tests to Github Actions
janaknat 4c4420a
Add Travis-CI config to build aarch64 wheels
janaknat 5047aa2
Upload wheels irrespective of success/failure
janaknat 66bf25e
Run all Github tests on Ubuntu 20.04
janaknat 1c96241
Merge branch 'develop' into arm64-travis
mpenkov cf95db6
Only build on tagged commits
janaknat File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Tests | ||
on: | ||
push: | ||
branches: [ develop ] | ||
pull_request: | ||
branches: [ develop ] | ||
|
||
jobs: | ||
tests: | ||
name: ${{ matrix.name }} | ||
runs-on: ${{ matrix.os }} | ||
defaults: | ||
run: | ||
shell: bash | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- {name: Linux, python: 3.6, os: ubuntu-20.04, tox: 'flake8,flake8-docs'} | ||
- {name: Linux, python: 3.6, os: ubuntu-20.04, tox: 'py36-linux'} | ||
- {name: Linux, python: 3.7, os: ubuntu-20.04, tox: 'py37-linux'} | ||
- {name: Linux, python: 3.8, os: ubuntu-20.04, tox: 'py38-linux'} | ||
env: | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Setup up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
- name: Update pip | ||
run: python -m pip install -U pip | ||
- name: Install tox, gdb | ||
run: | | ||
pip install tox | ||
sudo apt-get install -y gdb | ||
- name: Enable core dumps | ||
run: ulimit -c unlimited -S # enable core dumps | ||
- name: Run tox tests | ||
run: tox -e ${{ matrix.tox }} | ||
- name: Collect corefile | ||
if: ${{ failure() }} | ||
run: | | ||
pwd | ||
COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) | ||
if [[ -f "$COREFILE" ]]; then EXECFILE=$(gdb -c "$COREFILE" -batch | grep "Core was generated" | tr -d "\`" | cut -d' ' -f5); file "$COREFILE"; gdb -c "$COREFILE" "$EXECFILE" -x continuous_integration/debug.gdb -batch; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,49 @@ | ||
sudo: false | ||
|
||
cache: | ||
apt: true | ||
directories: | ||
- $HOME/.cache/pip | ||
- $HOME/.ccache | ||
- $HOME/.pip-cache | ||
dist: trusty | ||
branches: | ||
only: | ||
- /v\d+\.\d+\.\d+/ | ||
language: python | ||
arch: arm64-graviton2 | ||
dist: focal | ||
virt: vm | ||
group: edge | ||
services: docker | ||
env: | ||
TOX_PARALLEL_NO_SPINNER: 1 | ||
|
||
global: | ||
- REPO_DIR=gensim | ||
- BUILD_COMMIT=HEAD | ||
- UNICODE_WIDTH=32 | ||
- PLAT=aarch64 | ||
- MB_ML_VER=2014 | ||
- SKIP_NETWORK_TESTS=1 | ||
- DOCKER_TEST_IMAGE=multibuild/xenial_arm64v8 | ||
- BUILD_DEPENDS="numpy==1.19.2 scipy==1.5.3" | ||
- TEST_DEPENDS="pytest mock cython nmslib pyemd testfixtures Morfessor==2.0.2a4 python-levenshtein==0.12.0 visdom==0.1.8.9 scikit-learn" | ||
|
||
matrix: | ||
include: | ||
- python: '3.6' | ||
env: TOXENV="flake8,flake8-docs" | ||
|
||
- python: '3.8' | ||
- os: linux | ||
env: | ||
- TOXENV="py38-linux" | ||
dist: bionic | ||
|
||
- python: '3.7' | ||
- MB_PYTHON_VERSION=3.6 | ||
- os: linux | ||
env: | ||
- TOXENV="py37-linux" | ||
# The following two lines used to be necessary because Travis left files lying around in ~/.aws/, | ||
# messing up our tests. Now fixed since https://github.com/travis-ci/travis-ci/issues/7940 | ||
# - BOTO_CONFIG="/dev/null" | ||
#sudo: true | ||
dist: xenial | ||
|
||
- python: '3.6' | ||
env: TOXENV="py36-linux" | ||
|
||
|
||
- MB_PYTHON_VERSION=3.7 | ||
- os: linux | ||
env: | ||
- MB_PYTHON_VERSION=3.8 | ||
before_install: | ||
- source multibuild/common_utils.sh | ||
- source multibuild/travis_steps.sh | ||
- before_install | ||
install: | ||
- pip install tox | ||
- sudo apt-get install -y gdb | ||
|
||
|
||
before_script: | ||
- ulimit -c unlimited -S # enable core dumps | ||
|
||
|
||
script: tox | ||
|
||
|
||
after_failure: | ||
- pwd | ||
- COREFILE=$(find . -maxdepth 1 -name "core*" | head -n 1) | ||
- if [[ -f "$COREFILE" ]]; then EXECFILE=$(gdb -c "$COREFILE" -batch | grep "Core was generated" | tr -d "\`" | cut -d' ' -f5); file "$COREFILE"; gdb -c "$COREFILE" "$EXECFILE" -x continuous_integration/debug.gdb -batch; fi | ||
- build_wheel $REPO_DIR $PLAT | ||
script: | ||
- install_run $PLAT | ||
after_script: | ||
- ls -laht ${TRAVIS_BUILD_DIR}/wheelhouse/ | ||
- pip install wheelhouse-uploader | ||
- python -m wheelhouse_uploader upload --local-folder ${TRAVIS_BUILD_DIR}/wheelhouse/ --no-ssl-check gensim-wheels --provider S3 --no-enable-cdn | ||
|
||
notifications: | ||
email: | ||
- penkov+gensimwheels@pm.me | ||
on_success: always | ||
on_failure: always |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This needs to match to a tag name, not a branch name.
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.
Based on https://docs.travis-ci.com/user/customizing-the-build/#safelisting-or-blocklisting-branches I believe having a regex in branches.only will only build tagged commits.
Tagged commit build: https://travis-ci.com/github/janaknat/gensim/builds/214207365