Skip to content

Pass ctx as parameter #267

Pass ctx as parameter

Pass ctx as parameter #267

Workflow file for this run

# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: sudo apt-get install -y libasound2-dev
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Lint
run: make lint
- name: Build
run: make
- name: Test
run: make test-ci
- name: Build with CGO_ENABLED=0
run: make
env:
CGO_ENABLED: 0
- name: Test with CGO_ENABLED=0
run: make test
env:
CI: 1
CGO_ENABLED: 0
- name: Cross-platform build
run: |
make bin/twenty-twenty-twenty-windows-amd64
make bin/twenty-twenty-twenty-windows-arm64
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.21'
- name: Test
run: make test-ci
- name: Build
run: make
build-macos-nix:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Build
run: nix build
build-linux-nix:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Check Flake
run: nix flake check
- name: Build
run: |
nix build
# non-flake build
nix-build