From 4ce8665491c8a58ff2a4a74b589cbf1792745ede Mon Sep 17 00:00:00 2001 From: joachimbbp <104856283+joachimbbp@users.noreply.github.com> Date: Fri, 8 Mar 2024 12:08:31 -0500 Subject: [PATCH] updating yml --- .github/workflows/go.yml | 34 -------------------------- .github/workflows/goBuildMac.yml | 19 +++++++++++++++ .github/workflows/go_build_mac.yml | 28 --------------------- .github/workflows/main.yml | 39 ------------------------------ 4 files changed, 19 insertions(+), 101 deletions(-) delete mode 100644 .github/workflows/go.yml create mode 100644 .github/workflows/goBuildMac.yml delete mode 100644 .github/workflows/go_build_mac.yml delete mode 100644 .github/workflows/main.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml deleted file mode 100644 index 84a1020..0000000 --- a/.github/workflows/go.yml +++ /dev/null @@ -1,34 +0,0 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' # Adjust to match the Go version you're using - - - name: Install dependencies - run: | - brew update - brew install vips - brew install libxkbcommon - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... - diff --git a/.github/workflows/goBuildMac.yml b/.github/workflows/goBuildMac.yml new file mode 100644 index 0000000..d23d51c --- /dev/null +++ b/.github/workflows/goBuildMac.yml @@ -0,0 +1,19 @@ +name: Go + +on: [push] + +jobs: + build: + + runs-on: macos-latest + steps: + - name: Setup Go 1.21.x + uses: actions/setup-go@v4 + with: + go-version: '1.21.x' + - name: Checkout code + uses: actions/checkout@v2 + - name: Download dependencies + run: go mod download + - name: Build project + run: go build . #should I cache my dependencies? \ No newline at end of file diff --git a/.github/workflows/go_build_mac.yml b/.github/workflows/go_build_mac.yml deleted file mode 100644 index badf55d..0000000 --- a/.github/workflows/go_build_mac.yml +++ /dev/null @@ -1,28 +0,0 @@ -# This workflow will build a golang project -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go - -name: Go - -on: - push: - branches: [ "main" ] - pull_request: - branches: [ "main" ] - -jobs: - - build: - runs-on: macos-latest - steps: - - uses: actions/checkout@v3 - - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.21.6' - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./... diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 81cd54f..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,39 +0,0 @@ -name: Go Continuous Integration -#from chatGPT -on: [push, pull_request] - -jobs: - build: - name: Build and Test - runs-on: macos-latest - strategy: - matrix: - go-version: [1.21.6] - arch: [arm64] - - steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 # Ensures history for all branches is fetched - - - name: Set up Go - uses: actions/setup-go@v3 - with: - go-version: ${{ matrix.go-version }} - - - name: Set up environment - run: | - echo "GOOS=darwin" >> $GITHUB_ENV - echo "GOARCH=${{ matrix.arch }}" >> $GITHUB_ENV - - - name: Check Go version - run: go version - - - name: Get dependencies - run: go mod tidy - - - name: Build - run: go build -v ./... - - - name: Test - run: go test -v ./...