Skip to content

update

update #3

Workflow file for this run

name: Build
on:
push:
pull_request:
jobs:
cross-build:
strategy:
matrix:
go-version: ["1.23.3"]
os:
- ubuntu-latest
- macos-latest
# - windows-latest # Windows seems to have some issues with the Zig installation
runs-on: ${{ matrix.os }}
env:
# Our script only installs the dependencies automatically if it's running inside Docker.
# GitHub Actions is not running inside Docker, so we need to set this environment variable
# to allow the automatic installation of the dependencies.
ALLOW_OUTSIDE_DOCKER: "1"
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go-version }}
- name: Set up Zig
uses: mlugg/setup-zig@v1
with:
version: 0.14.0-dev.2265+8a00bd4ce
- name: Build
run: |
go mod vendor
make all
- name: Test
run: ./dist/linux-amd64/demo --database-url=sqlite://./test.sqlite3
cross-build-in-docker:
runs-on: ubuntu-latest
container:
image: golang:1.23.3
steps:
# Install Git for checking out the repository, otherwise the checkout action will
# download the repository by REST API. This will cause go build to fail because it
# will do some git operations.
- run: |
apt-get update -yq
apt-get install -yq git
- uses: actions/checkout@v4
- name: Build
run: |
go mod vendor
make all
- name: Test
run: ./dist/linux-amd64/demo --database-url=sqlite://./test.sqlite3
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
path: dist