diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..d331e90 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,45 @@ +# 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 + strategy: + matrix: + go: + - '1.22' + - '1.21' + # https://go.dev/doc/devel/release + name: Go ${{ matrix.go }} + steps: + - uses: actions/checkout@v4 + with: + repository: getargv/getargv + path: getargv + token: ${{ secrets.GH_PAT }} + - name: Build libgetargv + run: make install_dylib + working-directory: getargv + - uses: actions/checkout@v4 + with: + path: getargv.go + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + check-latest: true + + - name: Build + run: go build -C getargv.go + + - name: Test + run: go test -C getargv.go