|
2 | 2 |
|
3 | 3 | name: CI
|
4 | 4 |
|
5 |
| -# Controls when the action will run. Triggers the workflow on push or pull request |
6 |
| -# events but only for the master branch |
| 5 | +defaults: |
| 6 | + run: |
| 7 | + shell: bash |
| 8 | + |
7 | 9 | on:
|
8 | 10 | push:
|
9 | 11 | branches: [ master ]
|
10 | 12 | pull_request:
|
11 | 13 | branches: [ master ]
|
12 | 14 |
|
13 |
| -# A workflow run is made up of one or more jobs that can run sequentially or in parallel |
| 15 | +env: |
| 16 | + OPENBLAS_COMMIT: 349b722d8d09303 |
| 17 | + OPENBLAS_ROOT: "c:\\opt" |
| 18 | + |
14 | 19 | jobs:
|
15 |
| - # This workflow contains a single job called "build" |
16 | 20 | build:
|
17 | 21 | strategy:
|
18 | 22 | matrix:
|
19 | 23 | BUILD_BITS: [64, 32]
|
20 | 24 | INTERFACE64: ['1', '']
|
21 | 25 | os: [windows-latest]
|
22 |
| - # The type of runner that the job will run on |
| 26 | + exclude: |
| 27 | + - BUILD_BITS: 32 |
| 28 | + INTERFACE64: 1 |
| 29 | + |
23 | 30 | runs-on: ${{ matrix.os }}
|
24 | 31 |
|
25 |
| - # Steps represent a sequence of tasks that will be executed as part of the job |
26 | 32 | steps:
|
27 |
| - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it |
28 | 33 | - uses: actions/checkout@v2
|
| 34 | + - uses: ilammy/msvc-dev-cmd@v1 |
| 35 | + |
| 36 | + - name: Setup |
| 37 | + run: | |
| 38 | + BITS=${{ matrix.BUILD_BITS }} |
| 39 | + echo "BUILD_BITS=$BITS" >> $GITHUB_ENV; |
| 40 | + if [ "$BITS" == "32" ]; then |
| 41 | + echo "PLAT=i686" >> $GITHUB_ENV; |
| 42 | + |
| 43 | + else |
| 44 | + echo "PLAT=x86_64" >> $GITHUB_ENV; |
| 45 | + fi |
| 46 | + echo "START_DIR=$PWD" >> $GITHUB_ENV; |
| 47 | + choco install -y zip |
29 | 48 |
|
30 |
| - # Runs a set of commands using the runners shell |
31 |
| - - name: Run a multi-line script |
| 49 | + - run: | |
| 50 | + choco install -y mingw --forcex86 --force --version=7.3.0 |
| 51 | + refreshenv |
| 52 | + echo "C:\\ProgramData\\chocolatey\\lib\\mingw\\tools\\install\\mingw32\\bin" >> $GITHUB_PATH; |
| 53 | + name: Install 32-bit mingw |
| 54 | + shell: powershell |
| 55 | + if: ${{ matrix.BUILD_BITS == '32' }} |
| 56 | +
|
| 57 | + - name: Build |
| 58 | + run: | |
| 59 | + BITS=${{ matrix.BUILD_BITS }} |
| 60 | + if [ "$BITS" == "32" ]; then |
| 61 | + export PATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/bin:$PATH |
| 62 | + fi |
| 63 | + echo $PATH |
| 64 | + git submodule update --init --recursive |
| 65 | + tools/build_openblas.sh |
| 66 | +
|
| 67 | + - name: Test |
| 68 | + run: | |
| 69 | + BITS=${{ matrix.BUILD_BITS }} |
| 70 | + if [ "$BITS" == "32" ]; then |
| 71 | + export PATH=/c/ProgramData/chocolatey/lib/mingw/tools/install/mingw32/bin:$PATH |
| 72 | + fi |
| 73 | + tools/build_gfortran.sh |
| 74 | + cp test.exe builds |
| 75 | + cp test_dyn.exe builds |
| 76 | + ./test.exe |
| 77 | + cp $(cygpath $OPENBLAS_ROOT)/$BITS/bin/*.dll . |
| 78 | + ./test_dyn.exe |
| 79 | + |
| 80 | + - name: Upload |
32 | 81 | run: |
|
33 |
| - echo Add other actions to build, |
34 |
| - echo test, and deploy your project. |
| 82 | + pip install -q git+https://github.com/Anaconda-Platform/[email protected] |
| 83 | + # upload_to_anaconda_staging.sh |
| 84 | + |
0 commit comments