This repository was archived by the owner on Aug 30, 2024. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork18
Build linux/windows on ubuntu runner#202
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
8 commits Select commitHold shift + click to select a range
9411d80
Use Makefile for builds and use ubuntu runner
cmoogb1543a7
fixup! Use Makefile for builds and use ubuntu runner
cmoogb6d6bfa
fixup! Use Makefile for builds and use ubuntu runner
cmoogf1ecccf
fixup! Use Makefile for builds and use ubuntu runner
cmoogf93cb39
fixup! Use Makefile for builds and use ubuntu runner
cmoog5fd2992
Patches integration tests with Makefile
cmoog5a661b2
fixup! Patches integration tests with Makefile
cmoogccc29fa
fixup! Patches integration tests with Makefile
cmoogFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
14 changes: 13 additions & 1 deletion.github/workflows/build.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
43 changes: 38 additions & 5 deletions.github/workflows/release.yaml
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletionsMakefile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# Makefile for Coder CLI | ||
.PHONY: clean build build/macos build/windows build/linux | ||
clean: | ||
rm -rf ./ci/bin | ||
build: build/macos build/windows build/linux | ||
build/macos: | ||
# requires darwin | ||
CGO_ENABLED=1 GOOS=darwin GOARCH=amd64 ./ci/steps/build.sh | ||
build/windows: | ||
CGO_ENABLED=0 GOOS=windows GOARCH=386 ./ci/steps/build.sh | ||
build/linux: | ||
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./ci/steps/build.sh |
2 changes: 1 addition & 1 deletionci/integration/Dockerfile
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
FROM ubuntu:20.04 | ||
RUN apt-get update && apt-get install -y jq curl build-essential |
2 changes: 1 addition & 1 deletionci/integration/setup_test.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
84 changes: 35 additions & 49 deletionsci/steps/build.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -10,52 +10,38 @@ cd "$(git rev-parse --show-toplevel)/ci/steps" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Would be good if we got rid of this script entirely in favour of it being inlined in the makefile | ||
tag=$(git describe --tags) | ||
echo "--- building coder-cli for $GOOS-$GOARCH" | ||
tmpdir=$(mktemp -d) | ||
go build -ldflags "-X cdr.dev/coder-cli/internal/version.Version=${tag}" -o "$tmpdir/coder" ../../cmd/coder | ||
cp ../gon.json $tmpdir/gon.json | ||
pushd "$tmpdir" | ||
case "$GOOS" in | ||
"windows") | ||
artifact="coder-cli-$GOOS-$GOARCH.zip" | ||
mv coder coder.exe | ||
zip "$artifact" coder.exe | ||
;; | ||
"linux") | ||
artifact="coder-cli-$GOOS-$GOARCH.tar.gz" | ||
tar -czf "$artifact" coder | ||
;; | ||
"darwin") | ||
if [[ ${CI-} ]]; then | ||
artifact="coder-cli-$GOOS-$GOARCH.zip" | ||
gon -log-level debug ./gon.json | ||
mv coder.zip $artifact | ||
else | ||
artifact="coder-cli-$GOOS-$GOARCH.tar.gz" | ||
tar -czf "$artifact" coder | ||
echo "--- warning: not in ci, skipping signed release of darwin" | ||
fi | ||
;; | ||
esac | ||
popd | ||
mkdir -p ../bin | ||
cp "$tmpdir/$artifact" ../bin/$artifact | ||
rm -rf "$tmpdir" |
2 changes: 1 addition & 1 deletionpkg/tcli/tcli.go
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.