mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-06-06 06:06:49 +00:00
Add stability-fast action to pull requests (#1791)
* Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests * Add stability-fast action to pull requests
This commit is contained in:
parent
a4d241c30a
commit
28af7eb596
@ -1,4 +1,4 @@
|
|||||||
name: Build and Upload assets
|
name: Build and upload assets
|
||||||
on:
|
on:
|
||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
@ -10,31 +10,30 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
os: [ ubuntu-latest, windows-latest, macos-latest ]
|
||||||
name: Building For ${{ matrix.os }}
|
name: Building, ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Fix windows CRLF
|
- name: Fix CRLF on Windows
|
||||||
|
if: runner.os == 'Windows'
|
||||||
run: git config --global core.autocrlf false
|
run: git config --global core.autocrlf false
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# We need to increase the page size because the tests run out of memory on github CI windows.
|
# Increase the pagefile size on Windows to aviod running out of memory
|
||||||
# Use the powershell script from this github action: https://github.com/al-cheb/configure-pagefile-action/blob/master/scripts/SetPageFileSize.ps1
|
- name: Increase pagefile size on Windows
|
||||||
# MIT License (MIT) Copyright (c) 2020 Maxim Lobanov and contributors
|
|
||||||
- name: Increase page size on windows
|
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: powershell
|
run: powershell -command .github\workflows\SetPageFileSize.ps1
|
||||||
run: powershell -command .\.github\workflows\SetPageFileSize.ps1
|
|
||||||
|
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
|
|
||||||
- name: Build on linux
|
- name: Build on Linux
|
||||||
if: runner.os == 'Linux'
|
if: runner.os == 'Linux'
|
||||||
# `-extldflags=-static` - means static link everything, `-tags netgo,osusergo` means use pure go replacements for "os/user" and "net"
|
# `-extldflags=-static` - means static link everything,
|
||||||
|
# `-tags netgo,osusergo` means use pure go replacements for "os/user" and "net"
|
||||||
# `-s -w` strips the binary to produce smaller size binaries
|
# `-s -w` strips the binary to produce smaller size binaries
|
||||||
run: |
|
run: |
|
||||||
go build -v -ldflags="-s -w -extldflags=-static" -tags netgo,osusergo -o ./bin/ ./...
|
go build -v -ldflags="-s -w -extldflags=-static" -tags netgo,osusergo -o ./bin/ ./...
|
||||||
@ -66,7 +65,7 @@ jobs:
|
|||||||
echo "asset_name=${asset_name}" >> $GITHUB_ENV
|
echo "asset_name=${asset_name}" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
|
||||||
- name: Upload Release Asset
|
- name: Upload release asset
|
||||||
uses: actions/upload-release-asset@v1
|
uses: actions/upload-release-asset@v1
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
@ -1,4 +1,4 @@
|
|||||||
name: Go-Race
|
name: Race
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
@ -7,7 +7,7 @@ on:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
race_test:
|
race_test:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@ -19,10 +19,10 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.15
|
go-version: 1.16
|
||||||
|
|
||||||
- name: Set scheduled branch name
|
- name: Set scheduled branch name
|
||||||
shell: bash
|
shell: bash
|
31
.github/workflows/stability-fast.yml
vendored
31
.github/workflows/stability-fast.yml
vendored
@ -1,31 +0,0 @@
|
|||||||
name: Fast stability tests
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
stability-test-fast:
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
name: Fast stability tests on ${{ github.ref }}
|
|
||||||
steps:
|
|
||||||
|
|
||||||
- name: Set up Go 1.16
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: 1.16
|
|
||||||
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Install kaspad
|
|
||||||
run: go install ./...
|
|
||||||
|
|
||||||
- name: Install golint
|
|
||||||
run: go get -u golang.org/x/lint/golint
|
|
||||||
|
|
||||||
- name: Run fast stability test
|
|
||||||
timeout-minutes: 720
|
|
||||||
working-directory: stability-tests
|
|
||||||
run: ./install_and_test.sh
|
|
@ -1,38 +1,36 @@
|
|||||||
name: Go
|
name: Tests
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
pull_request:
|
pull_request:
|
||||||
# edtited - "title, body, or the base branch of the PR is modified"
|
# edtited - because base branch can be modified
|
||||||
# synchronize - "commit(s) pushed to the pull request"
|
# synchronize - update commits on PR
|
||||||
types: [opened, synchronize, edited, reopened]
|
types: [opened, synchronize, edited]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
build:
|
build:
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
os: [ ubuntu-16.04, macos-10.15, windows-2019 ]
|
os: [ ubuntu-latest, macos-latest, windows-latest ]
|
||||||
name: Testing on on ${{ matrix.os }}
|
name: Tests, ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Fix windows CRLF
|
- name: Fix CRLF on Windows
|
||||||
|
if: runner.os == 'Windows'
|
||||||
run: git config --global core.autocrlf false
|
run: git config --global core.autocrlf false
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
# We need to increase the page size because the tests run out of memory on github CI windows.
|
# Increase the pagefile size on Windows to aviod running out of memory
|
||||||
# Use the powershell script from this github action: https://github.com/al-cheb/configure-pagefile-action/blob/master/scripts/SetPageFileSize.ps1
|
- name: Increase pagefile size on Windows
|
||||||
# MIT License (MIT) Copyright (c) 2020 Maxim Lobanov and contributors
|
|
||||||
- name: Increase page size on windows
|
|
||||||
if: runner.os == 'Windows'
|
if: runner.os == 'Windows'
|
||||||
shell: powershell
|
run: powershell -command .github\workflows\SetPageFileSize.ps1
|
||||||
run: powershell -command .\.github\workflows\SetPageFileSize.ps1
|
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
- name: Set up Go 1.x
|
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
@ -51,14 +49,41 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: ./build_and_test.sh -v
|
run: ./build_and_test.sh -v
|
||||||
|
|
||||||
|
|
||||||
|
stability-test-fast:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
name: Fast stability tests, ${{ github.head_ref }}
|
||||||
|
steps:
|
||||||
|
|
||||||
|
- name: Setup Go
|
||||||
|
uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: 1.16
|
||||||
|
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Install kaspad
|
||||||
|
run: go install ./...
|
||||||
|
|
||||||
|
- name: Install golint
|
||||||
|
run: go get -u golang.org/x/lint/golint
|
||||||
|
|
||||||
|
- name: Run fast stability tests
|
||||||
|
working-directory: stability-tests
|
||||||
|
run: ./install_and_test.sh
|
||||||
|
|
||||||
|
|
||||||
coverage:
|
coverage:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-latest
|
||||||
name: Produce code coverage
|
name: Produce code coverage
|
||||||
steps:
|
steps:
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Set up Go 1.x
|
- name: Setup Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.16
|
go-version: 1.16
|
||||||
@ -70,4 +95,4 @@ jobs:
|
|||||||
run: go test -v -covermode=atomic -coverpkg=./... -coverprofile coverage.txt ./...
|
run: go test -v -covermode=atomic -coverpkg=./... -coverprofile coverage.txt ./...
|
||||||
|
|
||||||
- name: Upload coverage file
|
- name: Upload coverage file
|
||||||
run: bash <(curl -s https://codecov.io/bash)
|
run: bash <(curl -s https://codecov.io/bash)
|
Loading…
x
Reference in New Issue
Block a user