From 93446ca32481e6364f6365c8e36a25afce7e5ffe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oscar=20S=C3=B6derlund?= Date: Thu, 10 Feb 2022 07:27:03 +0100 Subject: [PATCH] ci: bump sage and use setup action Get caching for free. --- .github/workflows/ci.yml | 12 +++--------- .github/workflows/release.yml | 10 ++-------- .sage/go.mod | 2 +- .sage/go.sum | 4 ++-- Makefile | 10 +++++++++- 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index da1ed8c..b3b4a74 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,17 +5,11 @@ on: types: [opened, reopened, synchronize] jobs: - build: + make: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v2.2.0 - with: - go-version: ^1.17 + - name: Setup Sage + uses: einride/sage/actions/setup@master - name: Make run: make diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d5fe620..3d33f9f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -10,14 +10,8 @@ jobs: release: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2.4.0 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v2.2.0 - with: - go-version: ^1.17 + - name: Setup Sage + uses: einride/sage/actions/setup@master - name: Make run: make diff --git a/.sage/go.mod b/.sage/go.mod index 86bce7d..509599f 100644 --- a/.sage/go.mod +++ b/.sage/go.mod @@ -2,4 +2,4 @@ module sage go 1.17 -require go.einride.tech/sage v0.65.0 +require go.einride.tech/sage v0.84.0 diff --git a/.sage/go.sum b/.sage/go.sum index cf99847..0e532c0 100644 --- a/.sage/go.sum +++ b/.sage/go.sum @@ -1,2 +1,2 @@ -go.einride.tech/sage v0.65.0 h1:tan4TFJ8RdtdGrKGyxv9P8dG1JXZQIwXLA+a1Jce4aQ= -go.einride.tech/sage v0.65.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ= +go.einride.tech/sage v0.84.0 h1:/Pw9T/wOmCCs3aA5tzid7F+9nauYG1ifp2oHSxAwWLg= +go.einride.tech/sage v0.84.0/go.mod h1:EzV5uciFX7/2ho8EKB5K9JghOfXIxlzs694b+Tkl5GQ= diff --git a/Makefile b/Makefile index 244bd33..da4e513 100644 --- a/Makefile +++ b/Makefile @@ -5,9 +5,17 @@ sagefile := .sage/bin/sagefile -$(sagefile): .sage/go.mod .sage/*.go +.PHONY: $(sagefile) +$(sagefile): @cd .sage && go mod tidy && go run . +.PHONY: sage +sage: $(sagefile) + +.PHONY: update-sage +update-sage: + @cd .sage && go get -d go.einride.tech/sage@latest && go mod tidy && go run . + .PHONY: clean-sage clean-sage: @git clean -fdx .sage/tools .sage/bin .sage/build