github.com/jingcheng-WU/gonum@v0.9.1-0.20210323123734-f1a2a11a8f7b/.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          go-version: [1.16.x, 1.15.x]
    14          platform: [ubuntu-latest, macos-latest]
    15          env:
    16            - TAGS=""
    17            - TAGS="-tags bounds"
    18            - TAGS="-tags noasm"
    19            - TAGS="-tags safe"
    20            - FORCE_GOARCH=386
    21          exclude:
    22            - platform: macos-latest
    23              env: TAGS="-tags bounds"
    24            - platform: macos-latest
    25              env: TAGS="-tags noasm"
    26            - platform: macos-latest
    27              env: TAGS="-tags safe"
    28            - platform: macos-latest
    29              env: FORCE_GOARCH=386
    30  
    31      runs-on: ${{ matrix.platform }}
    32      env:
    33          GO111MODULE: on
    34          GOPATH: ${{ github.workspace }}
    35      defaults:
    36          run:
    37              working-directory: ${{ env.GOPATH }}/src/github.com/jingcheng-WU/gonum
    38  
    39      steps:
    40      - name: Install Go
    41        uses: actions/setup-go@v2
    42        with:
    43          go-version: ${{ matrix.go-version }}
    44  
    45      - name: Cache-Go
    46        uses: actions/cache@v1
    47        with:
    48          path: |
    49              ~/go/pkg/mod              # Module download cache
    50              ~/.cache/go-build         # Build cache (Linux)
    51              ~/Library/Caches/go-build # Build cache (Mac)
    52              '%LocalAppData%\go-build' # Build cache (Windows)
    53  
    54          key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    55          restore-keys: |
    56            ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
    57  
    58      - name: Checkout code
    59        uses: actions/checkout@v2
    60        with:
    61            path: ${{ env.GOPATH }}/src/github.com/jingcheng-WU/gonum
    62  
    63      - name: Check copyrights+imports+formatting+generate
    64        if: matrix.platform == 'ubuntu-latest' && matrix.tags == ''
    65        run: |
    66          ./.github/workflows/script.d/deps.sh
    67          ./.github/workflows/script.d/check-copyright.sh
    68          ./.github/workflows/script.d/check-imports.sh
    69          ./.github/workflows/script.d/check-formatting.sh
    70          ./.github/workflows/script.d/check-generate.sh
    71  
    72      - name: Test
    73        run: |
    74          ./.github/workflows/script.d/test.sh
    75  
    76      - name: Coverage
    77        if: matrix.platform == 'ubuntu-latest'
    78        run: |
    79          ./.github/workflows/script.d/test-coverage.sh
    80  
    81      - name: Upload-Coverage
    82        if: matrix.platform == 'ubuntu-latest'
    83        uses: codecov/codecov-action@v1