mirror of https://github.com/shirou/gopsutil
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.2 KiB
YAML
43 lines
1.2 KiB
YAML
3 years ago
|
on: [push, pull_request]
|
||
|
name: Build Test
|
||
|
jobs:
|
||
|
build_test_v2:
|
||
|
strategy:
|
||
|
matrix:
|
||
|
go-version: [1.16.x, 1.17.x]
|
||
|
steps:
|
||
|
- name: Install Go
|
||
|
uses: actions/setup-go@v2
|
||
|
with:
|
||
|
go-version: ${{ matrix.go-version }}
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Get dependencies
|
||
|
if: runner.os != 'Windows'
|
||
|
run: |
|
||
|
if ! command -v dep &>/dev/null; then
|
||
|
mkdir -p $GOPATH/bin
|
||
|
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
|
||
|
echo "PATH=$GOPATH/bin:$PATH" >> $GITHUB_PATH
|
||
|
fi
|
||
|
cd $GOPATH/src/github.com/shirou/gopsutil
|
||
|
dep ensure
|
||
|
# exclude v3 from being run with ./...
|
||
|
rm -rf $GOPATH/src/github.com/shirou/gopsutil/v3
|
||
|
- name: Build Test v2
|
||
|
run: |
|
||
|
make build_test
|
||
|
build_test_v3:
|
||
|
strategy:
|
||
|
matrix:
|
||
|
go-version: [1.16.x, 1.17.x]
|
||
|
steps:
|
||
|
- name: Install Go
|
||
|
uses: actions/setup-go@v2
|
||
|
with:
|
||
|
go-version: ${{ matrix.go-version }}
|
||
|
- name: Checkout code
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Build Test v3
|
||
|
run: |
|
||
|
cd v3 && make build_test
|