ci: replace slow setup-go with fast shell script in all workflows
Some checks failed
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 12s
Documentation / build-and-publish (push) Failing after 32s
CI with Native Libraries / Build and Test Native Libraries (push) Failing after 5s
CI with Native Libraries / Build Release Libraries (push) Has been skipped
Some checks failed
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 12s
Documentation / build-and-publish (push) Failing after 32s
CI with Native Libraries / Build and Test Native Libraries (push) Failing after 5s
CI with Native Libraries / Build Release Libraries (push) Has been skipped
This commit is contained in:
parent
8b95f2b5d2
commit
d003b3de64
5 changed files with 62 additions and 24 deletions
|
|
@ -11,10 +11,19 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.21'
|
||||
- name: Setup Go (fast)
|
||||
run: |
|
||||
REQUIRED_GO="1.21"
|
||||
if command -v go &> /dev/null && go version | grep -q "go${REQUIRED_GO}"; then
|
||||
echo "Go ${REQUIRED_GO} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Go ${REQUIRED_GO}..."
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
|
|
|
|||
|
|
@ -40,9 +40,18 @@ jobs:
|
|||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
run: |
|
||||
REQUIRED_GO="${GO_VERSION}"
|
||||
if command -v go &> /dev/null && go version | grep -q "go${REQUIRED_GO}"; then
|
||||
echo "Go ${REQUIRED_GO} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Go ${REQUIRED_GO}..."
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Cache Go modules
|
||||
uses: actions/cache@v4
|
||||
|
|
@ -130,10 +139,19 @@ jobs:
|
|||
- name: Checkout code
|
||||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
- name: Set up Go (fast)
|
||||
run: |
|
||||
REQUIRED_GO="${GO_VERSION}"
|
||||
if command -v go &> /dev/null && go version | grep -q "go${REQUIRED_GO}"; then
|
||||
echo "Go ${REQUIRED_GO} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Go ${REQUIRED_GO}..."
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Set up Zig
|
||||
uses: goto-bus-stop/setup-zig@v2
|
||||
|
|
|
|||
|
|
@ -32,9 +32,18 @@ jobs:
|
|||
sudo apt-get install -y wget rsync git
|
||||
|
||||
- name: Set up Go (for Hugo Modules)
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
run: |
|
||||
REQUIRED_GO="${GO_VERSION}"
|
||||
if command -v go &> /dev/null && go version | grep -q "go${REQUIRED_GO}"; then
|
||||
echo "Go ${REQUIRED_GO} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Go ${REQUIRED_GO}..."
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Install Hugo
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -118,9 +118,18 @@ jobs:
|
|||
uses: actions/checkout@v5
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: ${{ env.GO_VERSION }}
|
||||
run: |
|
||||
REQUIRED_GO="${GO_VERSION}"
|
||||
if command -v go &> /dev/null && go version | grep -q "go${REQUIRED_GO}"; then
|
||||
echo "Go ${REQUIRED_GO} already installed - skipping download"
|
||||
else
|
||||
echo "Installing Go ${REQUIRED_GO}..."
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Build binaries
|
||||
run: |
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
name: Test
|
||||
on: [push]
|
||||
jobs:
|
||||
test:
|
||||
runs-on: self-hosted
|
||||
steps:
|
||||
- run: echo "Hello from self-hosted"
|
||||
Loading…
Reference in a new issue