mirror of
https://github.com/AdguardTeam/AdGuardHome.git
synced 2024-11-25 22:45:46 +03:00
d3862614e5
Updates #6220.
Squashed commit of the following:
commit 2ad87979b4f8ade2cad8a1b86b8e0663dd53b098
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Nov 9 13:55:09 2023 +0300
all: upd go
commit 387200c3de899e6f59e8d2455cb2aa2b7194b311
Merge: 37f2855ed f8fe9bfc8
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Thu Nov 9 13:49:59 2023 +0300
Merge branch 'master' into 6220-average-processing-time
commit 37f2855ed104c20faa3f4d57d48bd221a59cacb3
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Wed Nov 8 17:08:13 2023 +0300
client: upd locales
commit a09be4183811cef29b594f9916dc76b87f89d304
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Tue Nov 7 20:46:24 2023 +0300
all: imp docs
commit f0b85ac1fef366da37b996d53e29d76d6279691f
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Fri Nov 3 14:17:32 2023 +0300
all: add todo
commit 48a5879865a1625410787edef6d78b309056af7b
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Fri Nov 3 13:38:14 2023 +0300
all: add upstream time
commit 4d7431c00e24f8a9d3e86160851b5ef3bd9d03fa
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Tue Oct 31 17:27:19 2023 +0300
all: upd chlog
commit 040b6b9cdebea2c9789d4d38f2a0a40ef4cb26d7
Author: Stanislav Chzhen <s.chzhen@adguard.com>
Date: Tue Oct 31 15:42:04 2023 +0300
all: imp average processing time
134 lines
4 KiB
YAML
134 lines
4 KiB
YAML
'name': 'build'
|
|
|
|
'env':
|
|
'GO_VERSION': '1.20.11'
|
|
'NODE_VERSION': '16'
|
|
|
|
'on':
|
|
'push':
|
|
'branches':
|
|
- '*'
|
|
'tags':
|
|
- 'v*'
|
|
'pull_request':
|
|
|
|
'jobs':
|
|
'test':
|
|
'runs-on': '${{ matrix.os }}'
|
|
'env':
|
|
'GO111MODULE': 'on'
|
|
'GOPROXY': 'https://goproxy.cn'
|
|
'strategy':
|
|
'fail-fast': false
|
|
'matrix':
|
|
'os':
|
|
- 'ubuntu-latest'
|
|
- 'macOS-latest'
|
|
- 'windows-latest'
|
|
'steps':
|
|
- 'name': 'Checkout'
|
|
'uses': 'actions/checkout@v2'
|
|
'with':
|
|
'fetch-depth': 0
|
|
- 'name': 'Set up Go'
|
|
'uses': 'actions/setup-go@v3'
|
|
'with':
|
|
'go-version': '${{ env.GO_VERSION }}'
|
|
- 'name': 'Set up Node'
|
|
'uses': 'actions/setup-node@v1'
|
|
'with':
|
|
'node-version': '${{ env.NODE_VERSION }}'
|
|
- 'name': 'Set up Go modules cache'
|
|
'uses': 'actions/cache@v2'
|
|
'with':
|
|
'path': '~/go/pkg/mod'
|
|
'key': "${{ runner.os }}-go-${{ hashFiles('go.sum') }}"
|
|
'restore-keys': '${{ runner.os }}-go-'
|
|
- 'name': 'Get npm cache directory'
|
|
'id': 'npm-cache'
|
|
'run': 'echo "::set-output name=dir::$( npm config get cache )"'
|
|
- 'name': 'Set up npm cache'
|
|
'uses': 'actions/cache@v2'
|
|
'with':
|
|
'path': '${{ steps.npm-cache.outputs.dir }}'
|
|
'key': "${{ runner.os }}-node-${{ hashFiles('client/package-lock.json') }}"
|
|
'restore-keys': '${{ runner.os }}-node-'
|
|
- 'name': 'Run make ci'
|
|
'shell': 'bash'
|
|
'run': 'make VERBOSE=1 ci'
|
|
- 'name': 'Upload coverage'
|
|
'uses': 'codecov/codecov-action@v1'
|
|
'if': "success() && matrix.os == 'ubuntu-latest'"
|
|
'with':
|
|
'token': '${{ secrets.CODECOV_TOKEN }}'
|
|
'file': './coverage.txt'
|
|
|
|
'build-release':
|
|
'runs-on': 'ubuntu-latest'
|
|
'needs': 'test'
|
|
'steps':
|
|
- 'name': 'Checkout'
|
|
'uses': 'actions/checkout@v2'
|
|
'with':
|
|
'fetch-depth': 0
|
|
- 'name': 'Set up Go'
|
|
'uses': 'actions/setup-go@v3'
|
|
'with':
|
|
'go-version': '${{ env.GO_VERSION }}'
|
|
- 'name': 'Set up Node'
|
|
'uses': 'actions/setup-node@v1'
|
|
'with':
|
|
'node-version': '${{ env.NODE_VERSION }}'
|
|
- 'name': 'Set up Go modules cache'
|
|
'uses': 'actions/cache@v2'
|
|
'with':
|
|
'path': '~/go/pkg/mod'
|
|
'key': "${{ runner.os }}-go-${{ hashFiles('go.sum') }}"
|
|
'restore-keys': '${{ runner.os }}-go-'
|
|
- 'name': 'Get npm cache directory'
|
|
'id': 'npm-cache'
|
|
'run': 'echo "::set-output name=dir::$(npm config get cache)"'
|
|
- 'name': 'Set up npm cache'
|
|
'uses': 'actions/cache@v2'
|
|
'with':
|
|
'path': '${{ steps.npm-cache.outputs.dir }}'
|
|
'key': "${{ runner.os }}-node-${{ hashFiles('client/package-lock.json') }}"
|
|
'restore-keys': '${{ runner.os }}-node-'
|
|
- 'name': 'Set up Snapcraft'
|
|
'run': 'sudo apt-get -yq --no-install-suggests --no-install-recommends install snapcraft'
|
|
- 'name': 'Set up QEMU'
|
|
'uses': 'docker/setup-qemu-action@v1'
|
|
- 'name': 'Set up Docker Buildx'
|
|
'uses': 'docker/setup-buildx-action@v1'
|
|
- 'name': 'Run snapshot build'
|
|
'run': 'make SIGN=0 VERBOSE=1 build-release build-docker'
|
|
|
|
'notify':
|
|
'needs':
|
|
- 'build-release'
|
|
# Secrets are not passed to workflows that are triggered by a pull request
|
|
# from a fork.
|
|
#
|
|
# Use always() to signal to the runner that this job must run even if the
|
|
# previous ones failed.
|
|
'if':
|
|
${{
|
|
always() &&
|
|
github.repository_owner == 'AdguardTeam' &&
|
|
(
|
|
github.event_name == 'push' ||
|
|
github.event.pull_request.head.repo.full_name == github.repository
|
|
)
|
|
}}
|
|
'runs-on': 'ubuntu-latest'
|
|
'steps':
|
|
- 'name': 'Conclusion'
|
|
'uses': 'technote-space/workflow-conclusion-action@v1'
|
|
- 'name': 'Send Slack notif'
|
|
'uses': '8398a7/action-slack@v3'
|
|
'with':
|
|
'status': '${{ env.WORKFLOW_CONCLUSION }}'
|
|
'fields': 'repo, message, commit, author, workflow'
|
|
'env':
|
|
'GITHUB_TOKEN': '${{ secrets.GITHUB_TOKEN }}'
|
|
'SLACK_WEBHOOK_URL': '${{ secrets.SLACK_WEBHOOK_URL }}'
|