Skip to content

Commit 7657ca5

Browse files
committed
move builds to github actions
1 parent 0bac489 commit 7657ca5

File tree

2 files changed

+87
-0
lines changed

2 files changed

+87
-0
lines changed

.github/workflows/multibuild.yml

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name: Build wheels
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
pull_request:
7+
branches: [ master ]
8+
9+
jobs:
10+
build:
11+
runs-on: ${{ matrix.os }}
12+
defaults:
13+
run:
14+
shell: bash
15+
strategy:
16+
fail-fast: false
17+
matrix:
18+
python-version: [3.7, 3.8, 3.9]
19+
os: [ubuntu-latest, macos-latest]
20+
platform: [x64]
21+
PLAT: [i686, x86_64]
22+
INTERFACE64: ['', '1']
23+
exclude:
24+
- os: macos-latest # macos-10.15
25+
PLAT: i686
26+
- PLAT: i686
27+
INTERFACE64: '1'
28+
env:
29+
REPO_DIR: OpenBLAS
30+
OPENBLAS_COMMIT: v0.3.13
31+
MB_PYTHON_VERSION: ${{ matrix.python-version }}
32+
TRAVIS_PYTHON_VERSION: ${{ matrix.python-version }}
33+
MB_ML_VER: ${{ matrix.MB_ML_VER }}
34+
BUILD_DIR: ${{ github.workspace }}
35+
SCIPY_WHEELS_NIGHTLY_ACCESS: ${{ secrets.SCIPY_WHEELS_NIGHTLY_ACCESS }}
36+
MULTIBUILD_WHEELS_STAGING_ACCESS: ${{ secrets.MULTIBUILD_WHEELS_STAGING_BUILD }}
37+
38+
steps:
39+
- uses: actions/checkout@v2
40+
with:
41+
submodules: recursive
42+
fetch-depth: 0
43+
- name: Set up Python ${{ matrix.python-version }}
44+
uses: actions/setup-python@v2
45+
with:
46+
python-version: ${{ matrix.python-version }}
47+
- name: Set extra env
48+
run: |
49+
if [ "macos-latest" == "${{ matrix.os }}" ]; then echo "TRAVIS_OS_NAME=osx" >> $GITHUB_ENV; else echo "TRAVIS_OS_NAME=${{ matrix.os }}" >> $GITHUB_ENV; fi
50+
echo "DOCKER_TEST_IMAGE=$(echo multibuild/xenial_${{ matrix.PLAT}})" >> $GITHUB_ENV;
51+
- name: Print some Environment variable
52+
run: |
53+
echo "TRAVIS_OS_NAME: ${TRAVIS_OS_NAME}"
54+
echo "PLAT: ${{ matrix.PLAT }}"
55+
echo "DOCKER_TEST_IMAGE: ${DOCKER_TEST_IMAGE}"
56+
- name: Install VirtualEnv
57+
run: |
58+
python -m pip install --upgrade pip
59+
pip install virtualenv
60+
- name: Build and Install Wheels
61+
run: |
62+
source travis-ci/build_steps.sh
63+
echo "------ BEFORE BUILD ---------"
64+
before_build
65+
echo "------ CLEAN CODE --------"
66+
clean_code $REPO_DIR $OPENBLAS_COMMIT
67+
echo "------ BUILD LIB --------"
68+
build_lib "$PLAT" "$INTERFACE64"
69+
- name: Upload wheels
70+
run: |
71+
# trigger an upload to the shared ecosystem
72+
# infrastructure at: https://anaconda.org/scipy-wheels-nightly
73+
# for cron jobs only (restricted to master branch once
74+
# per week)
75+
# SCIPY_WHEELS_NIGHTLY_ACCESS is a secret token
76+
# used in Travis CI config, originally
77+
#
78+
# for merges (push events) we use the staging area instead;
79+
# MULTIBUILD_WHEELS_STAGING_ACCESS is a secret token used in Travis
80+
# CI config, originally generated at anaconda.org for
81+
# multibuild-wheels-staging
82+
# generated at anaconda.org for scipy-wheels-nightly
83+
pip install git+https://github.com/Anaconda-Server/anaconda-client;
84+
ls ${BUILD_DIR}/wheelhouse/*.whl
85+
#anaconda -t ${{ secrets.MULTIBUILD_WHEELS_STAGING_BUILD }} upload --force -u multibuild-wheels-staging ${BUILD_DIR}/wheelhouse/*.whl;
86+
anaconda -t ${{ secrets.MULTIBUILD_WHEELS_STAGING_BUILD }} upload -u multibuild-wheels-staging ${BUILD_DIR}/wheelhouse/*.whl;
87+
File renamed without changes.

0 commit comments

Comments
 (0)