From e28563fe3d529054075c25b804684f975ab855ec Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Thu, 15 Apr 2021 12:28:40 +0300 Subject: [PATCH] Use /usr/local/golang-tip Signed-off-by: Alexey Palazhchenko --- .github/workflows/build.yml | 7 +++---- Dockerfile | 12 +++++++----- Makefile | 12 ++++++------ 3 files changed, 16 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 01409ac..eca6d21 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -6,8 +6,9 @@ on: # > Note: The schedule event can be delayed during periods of high loads of GitHub Actions workflow runs. # > High load times include the start of every hour. To decrease the chance of delay, schedule your workflow to run at a different time of the hour. - cron: '48 2 * * *' - # For monthly autoreleases TODO - - cron: '48 1 15 * *' + # For weekly autoreleases + # TODO https://github.com/AlekSi/golang-tip/issues/5 + # - cron: '48 1 * * 0' push: branches: - main @@ -127,5 +128,3 @@ jobs: title: tip files: | **.tar.gz - - # TODO monthly autoreleases diff --git a/Dockerfile b/Dockerfile index fd246fb..4451663 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,12 +1,12 @@ FROM golang:1.16.3 -RUN git clone https://go.googlesource.com/go /usr/local/golang-tip - # make sure that following steps are not cached; # mostly for local testing, not for GitHub Actions ARG CACHEBUST=1 RUN echo "$CACHEBUST" +RUN git clone https://go.googlesource.com/go /usr/local/golang-tip + ARG GO_BRANCH RUN test -n "$GO_BRANCH" @@ -18,13 +18,15 @@ RUN cd /usr/local/golang-tip && \ git pull ENV GOLANG_VERSION=tip -ENV GOROOT_FINAL=/usr/local/go -# RUN cd /usr/local/golang-tip/src && ./all.bash TODO run tests when they are fixed +ENV GOROOT_FINAL=/usr/local/golang-tip +# RUN cd /usr/local/golang-tip/src && ./all.bash +# TODO https://github.com/AlekSi/golang-tip/issues/3 RUN cd /usr/local/golang-tip/src && ./make.bash RUN cd / && \ rm -fr /usr/local/go && \ - mv /usr/local/golang-tip /usr/local/go && \ + rm -fr /tmp/golang-tip/.git && \ + ln -s /usr/local/golang-tip /usr/local/go && \ go version # to save time to users diff --git a/Makefile b/Makefile index 79c6f2c..1deface 100644 --- a/Makefile +++ b/Makefile @@ -19,14 +19,14 @@ docker-build: --build-arg CACHEBUST=$(shell date +%s) \ . -# TODO run tests when limits problem is fixed +# run tests when limits problem is fixed +# TODO https://github.com/AlekSi/golang-tip/issues/4 targz-build: test -n "$(GO_BRANCH)" - rm -fr /tmp/golang-tip /tmp/go + rm -fr /tmp/golang-tip git clone --branch $(GO_BRANCH) https://go.googlesource.com/go /tmp/golang-tip - cd /tmp/golang-tip/src && env GOROOT_FINAL=/usr/local/go ./make.bash + cd /tmp/golang-tip/src && env GOROOT_FINAL=/usr/local/golang-tip ./make.bash rm -fr /tmp/golang-tip/.git - mv /tmp/golang-tip /tmp/go - tar -czf golang-tip.tar.gz -C /tmp go - rm -fr /tmp/go + tar -czf golang-tip.tar.gz -C /tmp golang-tip + rm -fr /tmp/golang-tip