You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#121 seems to fix Windows, so how about if we add a GitHub workflow to use a build matrix to build on Windows, Mac and Linux ?
This GitHub workflow calls make "ci-all", so all we need to do is to add a make target for it to the Makefile. Github workflows will then call it for each OS.
It can also build for many go versions by adding extra params...
name: makeconcurrency:
group: ${{ github.workflow }}-${{ github.ref }}cancel-in-progress: trueon:
# Runs on pushes targeting the default branchpush:
branches:
- 'main'tags:
- 'v*'# Runs on PRS targeting any branchpull_request:
# Allows you to run this workflow manually from the Actions tabworkflow_dispatch:
env:
DESTDIR: ./binjobs:
## Tests for all platforms. Runs a matrix build on Windows, Linux and Mac,# with the list of expected supported Go versions (current, previous).#build:
name: Build and teststrategy:
fail-fast: falsematrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]go-version: [ 1.21.5 ]target: [ "ci-all", ]runs-on: ${{ matrix.os }}steps:
# Install go: https://github.com/actions/setup-go/releases/tag/v5.0.0
- name: Install gouses: actions/[email protected]with:
go-version: ${{ matrix.go-version }}check-latest: truecache-dependency-path: "**/*.sum"id: go# Set go bin#- name: Setup Go binary path# shell: bash# run: |# echo "GOPATH=${{ github.workspace }}" >> $GITHUB_ENV# echo "${{ github.workspace }}/bin" >> $GITHUB_PATH# Fix git line endings
- name: Git line endingsshell: bashrun: | git config --global core.autocrlf false git config --global core.eol lf# Checkout code: https://github.com/actions/checkout/releases/tag/v4.1.1
- name: Check out main code into the Go module directoryuses: actions/[email protected]# with:# ref: ${{ github.event.pull_request.head.sha }}# path: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}# Build using make
- name: make ${{ matrix.target }}shell: bashrun: | make $target# working-directory: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}env:
# CONFIG_PASSWORD: secretzSoSecureYouWontBelieveIt999target: ${{ matrix.target }}# CONFIG_PASSWORD: ${{ secrets.CONFIG_PASSWORD }}
The text was updated successfully, but these errors were encountered:
gedw99
changed the title
Make
Update Github Worklfows to cross OS build ?
Jan 17, 2024
gedw99
changed the title
Update Github Worklfows to cross OS build ?
Add a Github workflow to do cross OS builds.
Jan 17, 2024
@paulsmith
#121 seems to fix Windows, so how about if we add a GitHub workflow to use a build matrix to build on Windows, Mac and Linux ?
This GitHub workflow calls make "ci-all", so all we need to do is to add a make target for it to the Makefile. Github workflows will then call it for each OS.
It can also build for many go versions by adding extra params...
The text was updated successfully, but these errors were encountered: