github.com/gopherd/gonum@v0.0.4/.github/workflows/ci.yml (about) 1 name: CI 2 3 on: 4 pull_request: 5 branches: [ master ] 6 7 jobs: 8 9 build: 10 name: Build 11 strategy: 12 matrix: 13 # Do not move this line; it is referred to by README.md. 14 # Versions of Go that are explicitly supported by Gonum. 15 go-version: [1.17.x, 1.16.x] 16 platform: [ubuntu-latest, macos-latest] 17 force-goarch: ["", "386"] 18 tags: 19 - "" 20 - "-tags bounds" 21 - "-tags noasm" 22 - "-tags safe" 23 24 exclude: 25 - platform: ubuntu-latest 26 tags: "-tags bounds" 27 force-goarch: "386" 28 - platform: ubuntu-latest 29 tags: "-tags noasm" 30 force-goarch: "386" 31 - platform: ubuntu-latest 32 tags: "-tags safe" 33 force-goarch: "386" 34 - platform: macos-latest 35 force-goarch: "386" 36 - platform: macos-latest 37 tags: "-tags bounds" 38 - platform: macos-latest 39 tags: "-tags noasm" 40 - platform: macos-latest 41 tags: "-tags safe" 42 43 runs-on: ${{ matrix.platform }} 44 env: 45 GO111MODULE: on 46 GOPATH: ${{ github.workspace }} 47 TAGS: ${{ matrix.tags }} 48 FORCE_GOARCH: ${{ matrix.force-goarch }} 49 defaults: 50 run: 51 working-directory: ${{ env.GOPATH }}/src/gonum.org/v1/gonum 52 53 steps: 54 - name: Install Go 55 uses: actions/setup-go@v2 56 with: 57 go-version: ${{ matrix.go-version }} 58 59 - name: Checkout code 60 uses: actions/checkout@v2 61 with: 62 path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum 63 64 - name: Cache-Go 65 uses: actions/cache@v2 66 with: 67 # In order: 68 # * Module download cache 69 # * Build cache (Linux) 70 # * Build cache (Mac) 71 # * Build cache (Windows) 72 path: | 73 ~/go/pkg/mod 74 ~/.cache/go-build 75 ~/Library/Caches/go-build 76 '%LocalAppData%\go-build' 77 key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 78 restore-keys: | 79 ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} 80 81 - name: Check copyrights+imports+formatting+generate 82 if: matrix.platform == 'ubuntu-latest' && matrix.tags == '' 83 run: | 84 ./.github/workflows/script.d/deps.sh 85 ./.github/workflows/script.d/check-copyright.sh 86 ./.github/workflows/script.d/check-imports.sh 87 ./.github/workflows/script.d/check-formatting.sh 88 ./.github/workflows/script.d/check-generate.sh 89 90 - name: Test 91 run: | 92 ./.github/workflows/script.d/test.sh 93 94 - name: Coverage 95 if: matrix.platform == 'ubuntu-latest' 96 run: | 97 ./.github/workflows/script.d/test-coverage.sh 98 99 - name: Upload-Coverage 100 if: matrix.platform == 'ubuntu-latest' 101 uses: codecov/codecov-action@v1