Skip to content

Commit

Permalink
Use /usr/local/golang-tip
Browse files Browse the repository at this point in the history
Signed-off-by: Alexey Palazhchenko <[email protected]>
  • Loading branch information
AlekSi committed Apr 15, 2021
1 parent 6b9a315 commit e28563f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -127,5 +128,3 @@ jobs:
title: tip
files: |
**.tar.gz
# TODO monthly autoreleases
12 changes: 7 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"

Expand All @@ -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
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e28563f

Please sign in to comment.