Skip to content

Merge Upstream

Merge Upstream #73

Workflow file for this run

jobs:
build_test_linux:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# Linux runs both debug and release
kind: [debug, release]
runs-on: ubuntu-latest
# Service containers are only supported on Linux
services:
# Label used to access the service container
postgres:
# Docker Hub image
image: postgres
# Use 'trust' auth to allow password-less connections,
# matching the test's connection string.
env:
POSTGRES_HOST_AUTH_METHOD: trust
# Set health checks to wait until postgres has started
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
# Maps tcp port 5432 on service container to the host
- 5432:5432
env:
SWIFT_VERSION: 6.1
steps:
- uses: actions/setup-node@v4
with:
node-version: 25-nightly
- name: Setup Swift for Ubuntu
run: |
wget -q https://download.swift.org/swift-${SWIFT_VERSION}-release/ubuntu2204/swift-${SWIFT_VERSION}-RELEASE/swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
tar xzf swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
mv swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04 /opt/swift
rm swift-${SWIFT_VERSION}-RELEASE-ubuntu22.04.tar.gz
export PATH="/opt/swift/usr/bin:${PATH}"
- uses: actions/checkout@v2
- name: Create PostgreSQL database (Linux)
run: |
# The service container is running on localhost:5432
# We just need to create the database. Auth is 'trust'.
# Wait a few seconds for the service to be fully ready after health check
sleep 5
createdb -h localhost -p 5432 fuzzilli
- name: Build
run: swift build -c ${{ matrix.kind }} -v
- name: Run tests with Node.js
run: swift test -c ${{ matrix.kind }} -v
- name: Install jsvu
run: npm install jsvu -g
- name: Install d8
run: jsvu --os=default --engines=v8
- name: Run tests with d8
run: FUZZILLI_TEST_SHELL=~/.jsvu/engines/v8/v8 swift test -c ${{ matrix.kind }} -v
build_test_macos:
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
# macOS only runs debug
kind: [debug]
runs-on: macos-latest
# No 'services' block here, as it's not supported on macOS
env:
SWIFT_VERSION: 6.1
steps:
- uses: actions/setup-node@v4
with:
node-version: 25-nightly
# No Swift setup needed for macOS, it uses the pre-installed one
- uses: actions/checkout@v2
- name: Start PostgreSQL and create database (macOS)
run: |
# Start the pre-installed postgresql service
brew services start postgresql
# Wait for it to be ready
sleep 5
# Create the 'fuzzilli' database.
# On macOS/brew, this usually works without password auth by default for the current user.
createdb fuzzilli
- name: Build
run: swift build -c ${{ matrix.kind }} -v
- name: Run tests with Node.js
run: swift test -c ${{ matrix.kind }} -v
- name: Install jsvu
run: npm install jsvu -g
- name: Install d8
run: jsvu --os=default --engines=v8
- name: Run tests with d8
run: FUZZILLI_TEST_SHELL=~/.jsvu/engines/v8/v8 swift test -c ${{ matrix.kind }} -v