Coder Social home page Coder Social logo

cesar-velandia / ghaction-xgo Goto Github PK

View Code? Open in Web Editor NEW

This project forked from crazy-max/ghaction-xgo

0.0 0.0 0.0 2.75 MB

:octocat: GitHub Action for xgo, a Golang CGO cross compiler

Home Page: https://github.com/marketplace/actions/golang-cgo-cross-compiler

License: MIT License

Go 6.97% TypeScript 54.63% JavaScript 2.63% HCL 12.25% Dockerfile 23.51%

ghaction-xgo's Introduction

GitHub release GitHub marketplace Test workflow Codecov Become a sponsor Paypal Donate

About

A GitHub Action for xgo, a Golang CGO cross-compiler.

If you are interested, check out my other :octocat: GitHub Actions!


Usage

name: build

on:
  pull_request:
  push:

jobs:
  xgo:
    strategy:
      fail-fast: false
      matrix:
        go_version:
          - 1.12.4
          - 1.13
    runs-on: ubuntu-latest
    steps:
      -
        name: Checkout
        uses: actions/checkout@v2
      -
        name: Build with xgo
        uses: crazy-max/ghaction-xgo@v1
        with:
          xgo_version: latest
          go_version: ${{ matrix.go_version }}
          dest: build
          prefix: myapp
          targets: windows/386,windows/amd64,linux/386,linux/amd64,darwin/386,darwin/amd64
          v: true
          x: false
          race: false
          ldflags: -s -w
          buildmode: default

Customizing

inputs

Following inputs can be used as step.with keys

Name Type Description
xgo_version String xgo version. Eg. v0.3.2 (default latest)
go_version String Go release to use for cross compilation from those docker tags. Eg. 1.17 (default latest)
dest String Destination folder to put binaries in (default build)
pkg String Sub-package to build if not root import
prefix String Prefix to use for output naming. Default to package name
targets String Comma separated targets to build for. Eg. windows/amd64,linux/386 (default */*)
v Bool Prints the names of packages as they are compiled (default false)
x Bool Prints the build commands as compilation progresses (default false)
race Bool Enable data race detection (supported only on amd64) (default false)
tags String Comma separated list of build tags to consider satisfied during the build
ldflags String Arguments to pass on each go tool link invocation
buildmode String Indicates which kind of object file to build (default default)
working_dir String Working directory (default $GITHUB_WORKSPACE)

Limitation

This action is only available for Linux virtual environments.

Contributing

Want to contribute? Awesome! The most basic way to show your support is to star the project, or to raise issues. If you want to open a pull request, please read the contributing guidelines.

You can also support this project by becoming a sponsor on GitHub or by making a Paypal donation to ensure this journey continues indefinitely!

Thanks again for your support, it is much appreciated! ๐Ÿ™

License

MIT. See LICENSE for more details.

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.