-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8ae2c6a
commit 3b11d55
Showing
5 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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,55 @@ | ||
name: build and test | ||
on: [push] | ||
jobs: | ||
just_test: | ||
if: startsWith(github.ref, 'refs/heads/main') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.13.1' | ||
- name: go test | ||
run: go test -v ./... | ||
test_build_release: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/setup-go@v2 | ||
with: | ||
go-version: '^1.13.1' | ||
- name: Get the version | ||
id: get_tag | ||
run: echo ::set-output name=SOURCE_TAG::${GITHUB_REF#refs/tags/} | ||
- name: go test | ||
run: go test -v ./... | ||
- name: build | ||
shell: bash | ||
run: | | ||
# Make an artifacts directory | ||
mkdir -p artifacts | ||
# run the build for each supported OS | ||
for os in "linux" "darwin" "windows"; do | ||
echo "Building for $os..." | ||
GOOS=$os CGO_ENABLED=0 go build -a -ldflags="-X main.version=${{ steps.get_tag.outputs.SOURCE_TAG }}" -o ./artifacts/launch_${os} . | ||
# If its windows we need to rename it to have .exe at the end. | ||
if [ $os == "windows" ]; then | ||
mv ./artifacts/launch_$os ./artifacts/launch_$os.exe | ||
fi | ||
done | ||
# Make an Arm bin for linux also | ||
for arch in arm64 arm; do | ||
echo "Building for linux on $arch..." | ||
GOOS=linux GOARCH=$arch CGO_ENABLED=0 go build -a -ldflags="-X main.version=${{ steps.get_tag.outputs.SOURCE_TAG }}" -o ./artifacts/launch_linux_${arch} . | ||
done | ||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
files: artifacts/* | ||
body_path: .github/workflows/release_body.md | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} |
This file contains 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,4 @@ | ||
# Bug fix and Github work flows | ||
|
||
Fixed a bug where processes set to have a start delay did not delay. | ||
Adding in Github work flow. |
This file was deleted.
Oops, something went wrong.
This file contains 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,5 @@ | ||
{ | ||
"cSpell.words": [ | ||
"pmlogger" | ||
] | ||
} |
This file contains 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