ci: use fast Go setup that skips download if already installed
Some checks failed
CI with Native Libraries / Build and Test Native Libraries (push) Blocked by required conditions
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 11s
Documentation / build-and-publish (push) Has been cancelled
Test / test (push) Successful in 1s
Some checks failed
CI with Native Libraries / Build and Test Native Libraries (push) Blocked by required conditions
CI with Native Libraries / Build Release Libraries (push) Blocked by required conditions
Checkout test / test (push) Successful in 5s
CI with Native Libraries / Check Build Environment (push) Successful in 11s
Documentation / build-and-publish (push) Has been cancelled
Test / test (push) Successful in 1s
This commit is contained in:
parent
b4f2b3e785
commit
8b95f2b5d2
1 changed files with 33 additions and 7 deletions
|
|
@ -105,9 +105,22 @@ jobs:
|
|||
fetch-depth: 1
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.25'
|
||||
run: |
|
||||
REQUIRED_GO="1.25"
|
||||
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}..."
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.darwin-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
fi
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Build Native Libraries
|
||||
run: |
|
||||
|
|
@ -168,10 +181,23 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 1
|
||||
|
||||
- name: Setup Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: '1.25'
|
||||
- name: Setup Go (fast)
|
||||
run: |
|
||||
REQUIRED_GO="1.25"
|
||||
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}..."
|
||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.linux-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
||||
curl -sL "https://go.dev/dl/go${REQUIRED_GO}.darwin-amd64.tar.gz" | sudo tar -C /usr/local -xzf -
|
||||
fi
|
||||
export PATH="/usr/local/go/bin:$PATH"
|
||||
echo "/usr/local/go/bin" >> $GITHUB_PATH
|
||||
echo "Go ${REQUIRED_GO} installed"
|
||||
fi
|
||||
go version
|
||||
|
||||
- name: Build Release Libraries
|
||||
run: |
|
||||
|
|
|
|||
Loading…
Reference in a new issue