Code Monkey home page Code Monkey logo

go-cross-build's People

Contributors

thatisuday avatar tobyxdd avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

go-cross-build's Issues

Build failed for ubuntu 20.04.5 with exit status 2

The project used to build correctly previously on github actions and correctly build locally (using both windows and wsl).
Unfortunately now it doesn't build anymore.

this is my go.mod

module jim

go 1.19

require gorm.io/gorm v1.22.5

require (
	github.com/jinzhu/inflection v1.0.0 // indirect
	github.com/jinzhu/now v1.1.4 // indirect
	github.com/mattn/go-colorable v0.1.9 // indirect
	github.com/mattn/go-isatty v0.0.14 // indirect
	github.com/mattn/go-sqlite3 v1.14.5 // indirect
)

require (
	github.com/fatih/color v1.13.0
	golang.org/x/sys v0.1.0 // indirect
	gorm.io/driver/sqlite v1.1.4
)

this is the github yaml

name: release

on:
  release:
    types:
      - created

jobs:

  generate:
    name: Generate cross-platform builds
    runs-on: ubuntu-latest
    steps:

      - name: Checkout the repository
        uses: actions/checkout@v3

      - name: Generate build files
        uses: thatisuday/[email protected]
        with:
          platforms: "windows/amd64, linux/amd64, darwin/amd64"
          package: ""
          name: "jim"
          compress: "true"
          dest: "dist"
          ldflags: "\"-X 'jim/utils.Version=${{ github.ref_name }}'\""

      - name: Copy build-artifacts
        uses: skx/github-action-publish-binaries@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        with:
          args: "./dist/*.tar.gz"

this is the action's output

image

thanks in advance.

reduce binary size

add a reduce binary size options

  1. set -ldflags "-s -w" build options.

  2. build after use upx compress compiled binary.

build failed for Darwin/arm64

Build failed without any explanation.

2021-04-18T20:22:55.9499410Z An error occurred during build: exit status 2
2021-04-18T20:22:55.9504744Z exit status 1

Relative path for dest is diffucult to work with.

Relaytive to what working directory?

# workflow tasks
jobs:
  generate:
    name: Generate cross-platform builds
    runs-on: ubuntu-latest
    steps:
      - name: Checkout the repository
        uses: actions/checkout@v2
      - name: Generate build files
        uses: thatisuday/go-cross-build@v1
        with:
            platforms: 'linux/amd64, darwin/amd64, windows/amd64'
            package: 'cmd/<pkg>'
            name: 'program'
            compress: 'true'
            dest: 'dist'

Is what I am using but after it runs successfully I don't see any dist folder. What I expect is a dist folder to be in the repo with the three platforms compressed in it. Instead I don't see anything. I have tried variations of .., ../dist, . and nothing makes them appear

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.