Skip to content

Update golang.org/x/exp digest to 746e56f in go.mod (#97) #83

Update golang.org/x/exp digest to 746e56f in go.mod (#97)

Update golang.org/x/exp digest to 746e56f in go.mod (#97) #83

Workflow file for this run

name: Test SWIG wrappers
on:
push:
branches: [main]
pull_request:
permissions:
contents: read
jobs:
swig-python:
name: Python SWIG wrapper (${{ matrix.go-version }}, ${{ matrix.os }})
strategy:
matrix:
go-version: [1.25.x, 1.26.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
# Checkout before setup-go so go.mod is present for module cache key.
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -y swig python3-dev
- name: Cache Homebrew packages (macOS)
if: runner.os == 'macOS'
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/Library/Caches/Homebrew/downloads
key: brew-swig-python-${{ runner.arch }}-${{ hashFiles('.github/workflows/swig.yml') }}
restore-keys: brew-swig-python-${{ runner.arch }}-
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install autoconf automake libtool swig
- name: Build libcoraza
run: |
./build.sh
./configure
make V=1
- name: Check SWIG interface sync
run: make check-swig-sync
- name: Generate and compile Python SWIG wrapper
run: |
make -C examples/python
- name: Run Python example
run: |
make -C examples/python run
swig-java:
name: Java SWIG wrapper (${{ matrix.go-version }}, ${{ matrix.os }})
strategy:
matrix:
go-version: [1.25.x, 1.26.x]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
# Checkout before setup-go so go.mod is present for module cache key.
- name: Install Go
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0
with:
go-version: ${{ matrix.go-version }}
# setup-java handles JDK installation on all platforms via the GitHub
# tool cache, avoiding the large Temurin cask download on macOS.
- name: Set up Java
uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
with:
java-version: '21'
distribution: 'temurin'
- name: Install dependencies (Linux)
if: runner.os == 'Linux'
run: |
sudo apt-get update -q
sudo apt-get install -y swig
- name: Cache Homebrew packages (macOS)
if: runner.os == 'macOS'
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/Library/Caches/Homebrew/downloads
key: brew-swig-java-${{ runner.arch }}-${{ hashFiles('.github/workflows/swig.yml') }}
restore-keys: brew-swig-java-${{ runner.arch }}-
- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install autoconf automake libtool swig
- name: Build libcoraza
run: |
./build.sh
./configure
make V=1
- name: Check SWIG interface sync
run: make check-swig-sync
- name: Generate and compile Java SWIG wrapper
run: |
make -C examples/java
- name: Run Java example
run: |
make -C examples/java run