-
Notifications
You must be signed in to change notification settings - Fork 471
51 lines (51 loc) · 1.88 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: "Build Windows"
on:
push:
branches:
- master
pull_request:
jobs:
build-windows:
runs-on: windows-2022
defaults:
run:
shell: msys2 {0}
steps:
- name: Install msys2
uses: msys2/setup-msys2@v2
with:
update: true
path-type: inherit
- name: Check out code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Determine Go version
id: go_version
run: echo "GO_VERSION=$(./scripts/get_golang_version.sh)" >> $GITHUB_ENV
- name: Install golang
uses: actions/[email protected]
with:
go-version: ${{ env.GO_VERSION }}
- name: Restore libsodium from cache
id: cache-libsodium
uses: actions/[email protected]
with:
path: crypto/libs
key: libsodium-fork-v2-${{ runner.os }}-${{ hashFiles('crypto/libsodium-fork/**') }}
- name: Build
run: |
export ALGORAND_DEADLOCK=enable
export SKIP_GO_INSTALLATION=True
scripts/travis/build_test.sh
# - name: Upload artifact to Github
# uses: actions/upload-artifact@v2
# with:
# if-no-files-found: error
# path: $(git ls-files -o | grep -v crypto/libs | grep -v crypto/copies | grep -v crypto/libsodium-fork | grep -v crypto/lib/ | grep -v ^gen/ | grep -v swagger.json.validated | tr "\n" ":")
- name: Slack Notification
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
run: |
curl -X POST --data-urlencode "payload={\"text\": \"Build windows failed. ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }} \"}" $SLACK_WEBHOOK
if: ${{ failure() && (contains(github.ref_name, 'rel/nightly') || contains(github.ref_name, 'rel/beta') || contains(github.ref_name, 'rel/stable') || contains(github.ref_name, 'master')) }}