@@ -193,16 +193,6 @@ jobs:
193
193
- name : Install node_modules
194
194
run : ./scripts/yarn_install.sh
195
195
196
- - name : Install Protoc
197
- run : |
198
- # protoc must be in lockstep with our dogfood Dockerfile
199
- # or the version in the comments will differ.
200
- set -x
201
- cd dogfood
202
- DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
203
- protoc_dir=/usr/local/bin/protoc
204
- docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_dir
205
- chmod +x $protoc_dir
206
196
- uses : actions/setup-go@v3
207
197
with :
208
198
go-version : " ~1.19"
@@ -235,6 +225,18 @@ jobs:
235
225
- name : Install goimports
236
226
run : go install golang.org/x/tools/cmd/goimports@latest
237
227
228
+ - name : Install Protoc
229
+ run : |
230
+ # protoc must be in lockstep with our dogfood Dockerfile
231
+ # or the version in the comments will differ.
232
+ set -x
233
+ cd dogfood
234
+ DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
235
+ protoc_path=/usr/local/bin/protoc
236
+ docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
237
+ chmod +x $protoc_path
238
+ protoc --version
239
+
238
240
- name : make gen
239
241
run : " make --output-sync -j -B gen"
240
242
@@ -342,15 +344,6 @@ jobs:
342
344
fi
343
345
gotestsum --junitfile="gotests.xml" --packages="./..." -- -parallel=8 -timeout=$test_timeout -short -failfast $COVERAGE_FLAGS
344
346
345
- - name : Upload DataDog Trace
346
- if : github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
347
- env :
348
- DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
349
- DD_DATABASE : fake
350
- DD_CATEGORY : unit
351
- GIT_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
352
- run : go run scripts/datadog-cireport/main.go gotests.xml
353
-
354
347
- uses : codecov/codecov-action@v3
355
348
# This action has a tendency to error out unexpectedly, it has
356
349
# the `fail_ci_if_error` option that defaults to `false`, but
@@ -412,14 +405,6 @@ jobs:
412
405
- name : Test with PostgreSQL Database
413
406
run : make test-postgres
414
407
415
- - name : Upload DataDog Trace
416
- if : always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
417
- env :
418
- DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
419
- DD_DATABASE : postgresql
420
- GIT_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
421
- run : go run scripts/datadog-cireport/main.go gotests.xml
422
-
423
408
- uses : codecov/codecov-action@v3
424
409
# This action has a tendency to error out unexpectedly, it has
425
410
# the `fail_ci_if_error` option that defaults to `false`, but
@@ -498,35 +483,21 @@ jobs:
498
483
- name : Install zstd
499
484
run : sudo apt-get install -y zstd
500
485
501
- - name : Build site
502
- run : make -B site/out/index.html
503
-
504
486
- name : Build Release
505
487
run : |
506
488
set -euo pipefail
507
489
go mod download
508
490
509
- mkdir -p ./dist
510
- # build slim binaries
511
- ./scripts/build_go_slim.sh \
512
- --output ./dist/ \
513
- --compress 22 \
514
- linux:amd64,armv7,arm64 \
515
- windows:amd64,arm64 \
516
- darwin:amd64,arm64
517
-
518
- # build linux amd64 packages
519
- ./scripts/build_go_matrix.sh \
520
- --output ./dist/ \
521
- --package-linux \
522
- linux:amd64 \
523
- windows:amd64
491
+ version="$(./scripts/version.sh)"
492
+ make -j \
493
+ build/coder_"$version"_windows_amd64.zip \
494
+ build/coder_"$version"_linux_amd64.{tar.gz,deb}
524
495
525
496
- name : Install Release
526
497
run : |
527
498
gcloud config set project coder-dogfood
528
499
gcloud config set compute/zone us-central1-a
529
- gcloud compute scp ./dist /coder_*_linux_amd64.deb coder:/tmp/coder.deb
500
+ gcloud compute scp ./build /coder_*_linux_amd64.deb coder:/tmp/coder.deb
530
501
gcloud compute ssh coder -- sudo dpkg -i --force-confdef /tmp/coder.deb
531
502
gcloud compute ssh coder -- sudo systemctl daemon-reload
532
503
@@ -537,12 +508,9 @@ jobs:
537
508
with :
538
509
name : coder
539
510
path : |
540
- ./dist/*.zip
541
- ./dist/*.exe
542
- ./dist/*.tar.gz
543
- ./dist/*.apk
544
- ./dist/*.deb
545
- ./dist/*.rpm
511
+ ./build/*.zip
512
+ ./build/*.tar.gz
513
+ ./build/*.deb
546
514
retention-days : 7
547
515
548
516
test-js :
@@ -563,11 +531,6 @@ jobs:
563
531
restore-keys : |
564
532
js-${{ runner.os }}-
565
533
566
- # Go is required for uploading the test results to datadog
567
- - uses : actions/setup-go@v3
568
- with :
569
- go-version : " ~1.19"
570
-
571
534
- uses : actions/setup-node@v3
572
535
with :
573
536
node-version : " 14"
@@ -590,14 +553,6 @@ jobs:
590
553
files : ./site/coverage/lcov.info
591
554
flags : unittest-js
592
555
593
- - name : Upload DataDog Trace
594
- if : always() && github.actor != 'dependabot[bot]' && !github.event.pull_request.head.repo.fork
595
- env :
596
- DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
597
- DD_CATEGORY : unit
598
- GIT_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
599
- run : go run scripts/datadog-cireport/main.go site/test-results/junit.xml
600
-
601
556
test-e2e :
602
557
name : " test/e2e/${{ matrix.os }}"
603
558
needs :
@@ -621,7 +576,6 @@ jobs:
621
576
.eslintcache
622
577
key : js-${{ runner.os }}-e2e-${{ hashFiles('**/yarn.lock') }}
623
578
624
- # Go is required for uploading the test results to datadog
625
579
- uses : actions/setup-go@v3
626
580
with :
627
581
go-version : " ~1.19"
@@ -677,13 +631,6 @@ jobs:
677
631
path : ./site/test-results/**/*.webm
678
632
retention:days : 7
679
633
680
- - name : Upload DataDog Trace
681
- if : always() && github.actor != 'dependabot[bot]' && runner.os == 'Linux' && !github.event.pull_request.head.repo.fork
682
- env :
683
- DATADOG_API_KEY : ${{ secrets.DATADOG_API_KEY }}
684
- DD_CATEGORY : e2e
685
- GIT_COMMIT_MESSAGE : ${{ github.event.head_commit.message }}
686
- run : go run scripts/datadog-cireport/main.go site/test-results/junit.xml
687
634
chromatic :
688
635
# REMARK: this is only used to build storybook and deploy it to Chromatic.
689
636
runs-on : ubuntu-latest
0 commit comments