Skip to content

Commit

Permalink
feat: add Go
Browse files Browse the repository at this point in the history
Build Go in toolchain for later use in tools

Also make Go build exactly as one from go.dev for easier confirmation of reproducibility

Signed-off-by: Dmitry Sharshakov <[email protected]>
  • Loading branch information
dsseng committed Jan 8, 2025
1 parent dba7036 commit 9f444f6
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Pkgfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ vars:
make_sha256: dd16fb1d67bfab79a72f5e8390735c49e3e8e70b4945a15ab1f81ddb78658fb3
make_sha512: 145260cbd6a8226cef3dfef0c8baba31847beaebc7e6b65d39d02715fd4f4cab9b139b6c3772e550088d4f9ae80c6d3ed20b9a7664c693644dfb96b4cb60e67c

# renovate: datasource=github-tags extractVersion=^go(?<version>.*)$ depName=golang/go
golang_version: 1.23.4
golang_sha256: ad345ac421e90814293a9699cca19dd5238251c3f687980bbcae28495b263531
golang_sha512: 5d1cce76b2cbdf628f86a1a8185a07f362becee053cb4270281520e77b36e3908faeaf5b2a6266e61dec9866dc1f3791f77e8dc1bf5f8beaf858c138d0e18c22

# renovate: datasource=git-tags depName=https://gitlab.inria.fr/mpc/mpc.git
mpc_version: 1.3.1
mpc_sha256: ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8
Expand Down
Binary file modified deps.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
40 changes: 40 additions & 0 deletions golang/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: golang
install:
- go
dependencies:
- stage: binutils
steps:
- sources:
- url: https://dl.google.com/go/go{{ .golang_version }}.src.tar.gz
destination: go.src.tar.gz
sha256: "{{ .golang_sha256 }}"
sha512: "{{ .golang_sha512 }}"

env:
GOROOT_FINAL: '{{ .TOOLCHAIN }}/go'

prepare:
- tar -xzf go.src.tar.gz --strip-components=1
- rm go.src.tar.gz

build:
- cd src && sh make.bash
install:
- rm -rf pkg/obj
- rm -rf pkg/bootstrap
- rm -f pkg/tool/*/api
- |
find src \( -type f -a -name "*_test.go" \) \
-exec rm -rf \{\} \+
- |
find src \( -type d -a -name "testdata" \) \
-exec rm -rf \{\} \+
- |
find src -type f -a \( -name "*.bash" -o -name "*.rc" -o -name "*.bat" \) \
-exec rm -rf \{\} \+
- mkdir -p "${GOROOT_FINAL}"
- mv * "${GOROOT_FINAL}"
finalize:
- from: "{{ .TOOLCHAIN }}"
to: "{{ .TOOLCHAIN }}"
1 change: 1 addition & 0 deletions toolchain/pkg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ dependencies:
- stage: linux-headers
- stage: musl
- stage: make
- stage: golang
steps:
- env:
PATH: "{{ .TOOLCHAIN }}/bin:{{ .PATH }}"
Expand Down

0 comments on commit 9f444f6

Please sign in to comment.