Skip to content

Setup SWIG

Actions
Download and install a version of SWIG
v5
Latest
Star (3)

setup-swig

This actions step downloads and installs a version of SWIG.

It supports Linux, Windows and macOS runners when installing a precompiled binary distribution of SWIG JSE.

It also supports rebuilding any version of SWIG on Linux and macOS runners.

You can check the magickwand.js workflows for an example of a complex project that uses it.

Usage

For the latest version on the main branch:

name: "my-project"
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: mmomtchev/setup-swig@v4

      - name: Verify
        run: swig -version

For SWIG JSE:

name: "my-project"
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: mmomtchev/setup-swig@v4
        with:
          branch: jse

      - name: Verify
        run: swig -version

Specific version with authentication - use authentication if you get API rate errors:

name: "my-project"
on: [push]

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - uses: mmomtchev/setup-swig@v4
        with:
          version: v4.1.0
          token: ${{ secrets.GITHUB_TOKEN }}

      - name: Verify
        run: swig -version

Options

  version:
    description: 'Version to install'
    default: 'latest'
  branch:
    description: 'Branch to install'
    default: 'main'
  cache:
    description: 'Cache builds'
    default: true
  token:
    description: 'Optional authentication token'
    default: ''
  build:
    description: 'Build SWIG from source even if a binary distribution is available'
    default: false

See action.yml

Setup SWIG is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.

About

Download and install a version of SWIG
v5
Latest

Setup SWIG is not certified by GitHub. It is provided by a third-party and is governed by separate terms of service, privacy policy, and support documentation.