Add a parameter to disable configuration file automatic creation #140
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
name: Push | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-and-test: | |
name: Build and Test | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-22.04] | |
go: ["1.22.7", "1.23.1"] | |
goos: [linux] | |
goarch: [amd64, arm64] | |
steps: | |
- name: Setup Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Code checkout | |
uses: actions/checkout@v4 | |
- name: go mod download | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go mod download | |
- name: Build | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
CGO_ENABLED: 0 | |
SRC_PATH: github.com/pelican-dev/wings | |
run: | | |
go build -v -trimpath -ldflags="-s -w -X ${SRC_PATH}/system.Version=dev-${GIT_COMMIT:0:7}" -o dist/wings ${SRC_PATH} | |
go build -v -trimpath -ldflags="-X ${SRC_PATH}/system.Version=dev-${GIT_COMMIT:0:7}" -o dist/wings_debug ${SRC_PATH} | |
chmod 755 dist/* | |
- name: go test | |
if: ${{ matrix.goarch == 'amd64' }} | |
env: | |
CGO_ENABLED: 0 | |
run: | | |
go test $(go list ./...) | |
- name: go test -race | |
if: ${{ matrix.goarch == 'amd64' }} | |
env: | |
CGO_ENABLED: 1 | |
run: | | |
go test -race $(go list ./...) | |
- name: Upload Release Artifact | |
uses: actions/upload-artifact@v4 | |
if: ${{ (github.ref == 'refs/heads/main' || github.event_name == 'pull_request') && matrix.go == '1.22.7' }} | |
with: | |
name: wings_linux_${{ matrix.goarch }} | |
path: dist/wings | |
- name: Upload Debug Artifact | |
uses: actions/upload-artifact@v4 | |
if: ${{ (github.ref == 'refs/heads/main' || github.event_name == 'pull_request') && matrix.go == '1.22.7' }} | |
with: | |
name: wings_linux_${{ matrix.goarch }}_debug | |
path: dist/wings_debug |