chore: Revert parallel Makefile builds (#3918)

This was breaking the release process. Namely it was running
the `gen` targets due to the dependency tree, which was failing
on macOS and Linux runners. This revert can be reverted once
we fix that up.
This commit is contained in:
Kyle Carberry
2022-09-07 01:56:51 +00:00
committed by GitHub
parent d2e6f305b1
commit b077f71015
18 changed files with 713 additions and 559 deletions
+25 -8
View File
@@ -500,21 +500,35 @@ jobs:
- name: Install zstd
run: sudo apt-get install -y zstd
- name: Build site
run: make -B site/out/index.html
- name: Build Release
run: |
set -euo pipefail
go mod download
version="$(./scripts/version.sh)"
make -j \
build/coder_"$version"_windows_amd64.zip \
build/coder_"$version"_linux_amd64.{tar.gz,deb}
mkdir -p ./dist
# build slim binaries
./scripts/build_go_slim.sh \
--output ./dist/ \
--compress 22 \
linux:amd64,armv7,arm64 \
windows:amd64,arm64 \
darwin:amd64,arm64
# build linux amd64 packages
./scripts/build_go_matrix.sh \
--output ./dist/ \
--package-linux \
linux:amd64 \
windows:amd64
- name: Install Release
run: |
gcloud config set project coder-dogfood
gcloud config set compute/zone us-central1-a
gcloud compute scp ./build/coder_*_linux_amd64.deb coder:/tmp/coder.deb
gcloud compute scp ./dist/coder_*_linux_amd64.deb coder:/tmp/coder.deb
gcloud compute ssh coder -- sudo dpkg -i --force-confdef /tmp/coder.deb
gcloud compute ssh coder -- sudo systemctl daemon-reload
@@ -525,9 +539,12 @@ jobs:
with:
name: coder
path: |
./build/*.zip
./build/*.tar.gz
./build/*.deb
./dist/*.zip
./dist/*.exe
./dist/*.tar.gz
./dist/*.apk
./dist/*.deb
./dist/*.rpm
retention-days: 7
test-js:
+55 -60
View File
@@ -65,54 +65,52 @@ jobs:
restore-keys: |
js-${{ runner.os }}-
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
- name: Install protoc-gen-go-drpc
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.26
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Install Protoc
run: |
# protoc must be in lockstep with our dogfood Dockerfile
# or the version in the comments will differ.
set -x
cd dogfood
DOCKER_BUILDKIT=1 docker build . --target proto -t protoc
protoc_path=/usr/local/bin/protoc
docker run --rm --entrypoint cat protoc /tmp/bin/protoc > $protoc_path
chmod +x $protoc_path
protoc --version
- name: Install nfpm
run: go install github.com/goreleaser/nfpm/v2/cmd/nfpm@v2.16.0
- name: Install zstd
run: sudo apt-get install -y zstd
- name: Build Site
run: make site/out/index.html
- name: Build Linux and Windows Binaries
run: |
set -euo pipefail
go mod download
version="$(./scripts/version.sh)"
make -j \
-W coderd/database/querier.go \
build/coder_"$version"_linux_{amd64,armv7,arm64}.{tar.gz,apk,deb,rpm} \
build/coder_"$version"_windows_{amd64,arm64}.zip \
mkdir -p ./dist
# build slim binaries
./scripts/build_go_slim.sh \
--output ./dist/ \
--compress 22 \
linux:amd64,armv7,arm64 \
windows:amd64,arm64 \
darwin:amd64,arm64
# build linux and windows binaries
./scripts/build_go_matrix.sh \
--output ./dist/ \
--archive \
--package-linux \
linux:amd64,armv7,arm64 \
windows:amd64,arm64
- name: Build Linux Docker images
run: |
set -euxo pipefail
# build and (maybe) push Docker images for each architecture
version="$(./scripts/version.sh)"
push=""
if [[ "$CODER_RELEASE" == *t* ]]; then
push="push/"
fi
make -j \
"$push"build/coder_"$version"_linux_{amd64,arm64,armv7}.tag
images=()
for arch in amd64 armv7 arm64; do
img="$(
./scripts/build_docker.sh \
${{ (!github.event.inputs.dry_run && !github.event.inputs.snapshot) && '--push' || '' }} \
--arch "$arch" \
./dist/coder_*_linux_"$arch"
)"
images+=("$img")
done
# we can't build multi-arch if the images aren't pushed, so quit now
# if dry-running
@@ -122,13 +120,14 @@ jobs:
fi
# build and push multi-arch manifest
make -j push/build/coder_"$version"_linux.tag
./scripts/build_docker_multiarch.sh \
--push \
"${images[@]}"
# if the current version is equal to the highest (according to semver)
# version in the repo, also create a multi-arch image as ":latest" and
# push it
if [[ "$(git tag | grep '^v' | grep -vE '(rc|dev|-|\+|\/)' | sort -r --version-sort | head -n1)" == "v$(./scripts/version.sh)" ]]; then
make -j push/build/coder_"$version"_linux.tag
./scripts/build_docker_multiarch.sh \
--push \
--target "$(./scripts/image_tag.sh --version latest)" \
@@ -140,11 +139,11 @@ jobs:
with:
name: linux
path: |
./build/*.zip
./build/*.tar.gz
./build/*.apk
./build/*.deb
./build/*.rpm
dist/*.zip
dist/*.tar.gz
dist/*.apk
dist/*.deb
dist/*.rpm
# The mac binaries get built on mac runners because they need to be signed,
# and the signing tool only runs on mac. This darwin job only builds the Mac
@@ -185,18 +184,6 @@ jobs:
restore-keys: |
js-${{ runner.os }}-
- name: Install protoc-gen-go
run: go install google.golang.org/protobuf/cmd/protoc-gen-go@v1.26
- name: Install protoc-gen-go-drpc
run: go install storj.io/drpc/cmd/protoc-gen-go-drpc@v0.0.26
- name: Install goimports
run: go install golang.org/x/tools/cmd/goimports@latest
- name: Install Protoc
uses: arduino/setup-protoc@v1
with:
version: '3.x'
- name: Install dependencies
run: |
set -euo pipefail
@@ -226,11 +213,22 @@ jobs:
set -euo pipefail
go mod download
version="$(./scripts/version.sh)"
make -j \
build/coder_"$version"_darwin_{amd64,arm64}.zip
mkdir -p ./dist
# build slim binaries
./scripts/build_go_slim.sh \
--output ./dist/ \
--compress 22 \
linux:amd64,armv7,arm64 \
windows:amd64,arm64 \
darwin:amd64,arm64
# build darwin binaries
./scripts/build_go_matrix.sh \
--output ./dist/ \
--archive \
--sign-darwin \
darwin:amd64,arm64
env:
CODER_SIGN_DARWIN: "1"
AC_USERNAME: ${{ secrets.AC_USERNAME }}
AC_PASSWORD: ${{ secrets.AC_PASSWORD }}
AC_APPLICATION_IDENTITY: BDB050EB749EDD6A80C6F119BF1382ECA119CCCC
@@ -239,7 +237,7 @@ jobs:
uses: actions/upload-artifact@v3
with:
name: darwin
path: ./build/*.zip
path: ./dist/coder_*.zip
publish:
runs-on: ubuntu-latest
@@ -280,11 +278,8 @@ jobs:
- name: Publish Helm
run: |
set -euxo pipefail
version="$(./scripts/version.sh)"
make -j \
build/coder_helm_"$version".tgz
mv ./build/*.tgz ./artifacts/
./scripts/helm.sh --push
mv ./dist/*.tgz ./artifacts/
- name: Publish Release
run: |