2022-05-19 23:32:47 +00:00
|
|
|
name: Wasm-Cross
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- '*'
|
|
|
|
|
2022-08-15 05:43:07 +00:00
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2022-05-19 23:32:47 +00:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
|
|
|
|
|
|
steps:
|
2022-08-30 11:41:08 +00:00
|
|
|
- name: Check out code into the Go module directory
|
|
|
|
uses: actions/checkout@v3
|
2022-05-19 23:32:47 +00:00
|
|
|
|
|
|
|
- name: Set up Go
|
|
|
|
uses: actions/setup-go@v3
|
|
|
|
with:
|
2022-08-30 11:41:08 +00:00
|
|
|
go-version-file: go.mod
|
2022-05-19 23:32:47 +00:00
|
|
|
id: go
|
|
|
|
|
2022-07-19 21:32:06 +00:00
|
|
|
- name: Wasm client build
|
2022-05-19 23:32:47 +00:00
|
|
|
env:
|
|
|
|
GOOS: js
|
|
|
|
GOARCH: wasm
|
2022-08-02 19:28:20 +00:00
|
|
|
run: go build ./cmd/tsconnect/wasm ./cmd/tailscale/cli
|
2022-05-19 23:32:47 +00:00
|
|
|
|
2022-07-25 19:16:02 +00:00
|
|
|
- name: tsconnect static build
|
|
|
|
# Use our custom Go toolchain, we set build tags (to control binary size)
|
|
|
|
# that depend on it.
|
2022-08-24 01:05:23 +00:00
|
|
|
run: |
|
|
|
|
./tool/go run ./cmd/tsconnect --fast-compression build
|
2022-10-17 22:24:03 +00:00
|
|
|
./tool/go run ./cmd/tsconnect --fast-compression build-pkg
|
2022-07-25 19:16:02 +00:00
|
|
|
|
2022-05-19 23:32:47 +00:00
|
|
|
- uses: k0kubun/action-slack@v2.0.0
|
|
|
|
with:
|
|
|
|
payload: |
|
|
|
|
{
|
|
|
|
"attachments": [{
|
|
|
|
"text": "${{ job.status }}: ${{ github.workflow }} <https://github.com/${{ github.repository }}/commit/${{ github.sha }}/checks|${{ env.COMMIT_DATE }} #${{ env.COMMIT_NUMBER_OF_DAY }}> " +
|
|
|
|
"(<https://github.com/${{ github.repository }}/commit/${{ github.sha }}|" + "${{ github.sha }}".substring(0, 10) + ">) " +
|
|
|
|
"of ${{ github.repository }}@" + "${{ github.ref }}".split('/').reverse()[0] + " by ${{ github.event.head_commit.committer.name }}",
|
|
|
|
"color": "danger"
|
|
|
|
}]
|
|
|
|
}
|
|
|
|
env:
|
|
|
|
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
|
|
|
|
if: failure() && github.event_name == 'push'
|