Debian Codegraph @

.github/workflows/ci.yml

raw symbols SCIP
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.23.x, 1.22.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@v5
56 with:
57 go-version: ${{ matrix.go-version }}
58
59 - name: Checkout code
60 uses: actions/checkout@v4
61 with:
62 path: ${{ env.GOPATH }}/src/gonum.org/v1/gonum
63
64 - name: Cache-Go
65 uses: actions/cache@v4
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 sudo apt-get update
85 sudo apt-get install -qq ragel
86 ./.github/workflows/script.d/deps.sh
87 ./.github/workflows/script.d/check-copyright.sh
88 ./.github/workflows/script.d/check-imports.sh
89 ./.github/workflows/script.d/check-formatting.sh
90 ./.github/workflows/script.d/check-generate.sh
91
92 - name: Test
93 run: |
94 ./.github/workflows/script.d/test.sh
95
96 - name: Coverage
97 if: matrix.platform == 'ubuntu-latest'
98 run: |
99 ./.github/workflows/script.d/test-coverage.sh
100
101 - name: Upload-Coverage
102 if: matrix.platform == 'ubuntu-latest'
103 uses: codecov/codecov-action@v1