8000 GitHub - jp-pino/abc: Apt, Brew, and Choco dependencies in one action. Easy as ABC!
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

jp-pino/abc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 

Repository files navigation

abc

Simply your build actions with Apt, Brew, and Choco dependencies in one action. Easy as ABC!

Motivation

Setting up a GitHub Action to build your project is fairly easy. One of the most useful tools for a cross-platform build job is GitHub Actions's job.strategy.matrix, which allows you to run the same build steps on multiple platforms. However, if you have platform-specific dependencies, it can be a pain to manage, as you have to add a new action for each platform, and check the runner's platform in each step ( Here are some examples of this in the wild ). This conflicts with the goal of having a single build step that runs on all platforms. Enter abc, a simple build action that automates the process of add 7B56 ing platform-specific dependencies to your build via apt, brew, and choco. Let's make platform-specific dependencies easy as ABC!

Getting Started

Add a lyricwulf/abc step to your job to install dependencies:

- uses: lyricwulf/abc@v1
  with: 
    linux: libfoo
    macos: mac-lib
    windows: win-lib

Specify multiple dependencies in one line:

  with: 
    linux: libfoo libbar libbaz

Specify dependencies for Unix-like or all platforms:

libfoo and libbar are installed for MacOS and Linux. libbaz and liblyric are installed for Linux, Windows, and MacOS.

  with:
    unix: libfoo libbar
    all: libbaz liblyric

Specify package version:

Target a specific version of a dependency using @ and a version constraint.

  with:
    linux: libfoo@1.2.3
    macos: libbar@4.2.0
    windows: libbaz@0.6.9-nice

Example Use

Write cross platform jobs using job.strategy.matrix and abc:

jobs:
  foo:
    runs-on: ${{ matrix.os }}
    strategy:
      matrix:
        include: 
          - os: windows-latest
          - os: macos-latest
          - os: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      - uses: lyricwulf/abc@v1
        with:
          windows: lib-from-choco
          macos: lib-from-brew
          linux: libfoo

Contributing

Any and all contributions are welcome! Please open an issue or a pull request.

About

Apt, Brew, and Choco dependencies in one action. Easy as ABC!

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%
0