CI: kör i runnerns standardimage och installera Go från tarball
All checks were successful
release / build-release (push) Successful in 1m42s
All checks were successful
release / build-release (push) Successful in 1m42s
golang-imagen saknar node, vilket actions/checkout och actions/cache kräver. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -9,6 +9,10 @@ name: release
|
||||
# utan korskompilator – och Pi5:n ska inte belastas med spelbyggen.
|
||||
# Är datorn av köas jobbet tills runnern är tillbaka (ofarligt: pushar görs
|
||||
# ändå därifrån). Första steget vägrar köra på arm64 som skydd om labels ändras.
|
||||
#
|
||||
# Jobbet kör i runnerns standardimage (catthehacker/ubuntu:act-latest, har
|
||||
# node som actions/checkout och actions/cache kräver) och installerar Go från
|
||||
# go.dev – en golang-image saknar node och fäller JS-actions.
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
@@ -19,11 +23,12 @@ on:
|
||||
description: "Release-tag (lämna tom för 'latest')"
|
||||
required: false
|
||||
|
||||
env:
|
||||
GO_VERSION: "1.27.0"
|
||||
|
||||
jobs:
|
||||
build-release:
|
||||
runs-on: linux-amd64
|
||||
container:
|
||||
image: golang:1.27-bookworm
|
||||
steps:
|
||||
- name: Vägra bygga på arm64/Pi5
|
||||
run: |
|
||||
@@ -38,19 +43,22 @@ jobs:
|
||||
with:
|
||||
fetch-depth: 0 # taggar behövs för versionsstämpeln (git describe)
|
||||
|
||||
- name: Byggberoenden (X11/GL/ALSA-headers för Ebitengine på Linux)
|
||||
- name: Installera Go ${{ env.GO_VERSION }} + byggberoenden (X11/GL/ALSA-headers för Ebitengine)
|
||||
run: |
|
||||
curl -fsSL "https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz" -o /tmp/go.tgz
|
||||
rm -rf /usr/local/go && tar -C /usr/local -xzf /tmp/go.tgz
|
||||
echo "/usr/local/go/bin" >> "$GITHUB_PATH"
|
||||
apt-get update -qq
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends \
|
||||
gcc libc6-dev pkg-config libgl1-mesa-dev libx11-dev libxrandr-dev libxcursor-dev \
|
||||
libxinerama-dev libxi-dev libxxf86vm-dev libasound2-dev zip jq curl git >/dev/null
|
||||
git config --global --add safe.directory '*'
|
||||
go version
|
||||
/usr/local/go/bin/go version
|
||||
|
||||
- name: Cache Go-moduler
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: /go/pkg/mod
|
||||
path: ~/go/pkg/mod
|
||||
key: gomod-${{ hashFiles('go.sum') }}
|
||||
restore-keys: gomod-
|
||||
|
||||
|
||||
Reference in New Issue
Block a user