build: uses setup-go@v3 to simplify cache config
This updates to setup-go@v3 which is the only updated version (v2 last updated in feb), and employs its cache to simplify workflow configuration. Notably, we can't do this for Alpine until #3146 Signed-off-by: Adrian Cole <adrian@tetrate.io>
Этот коммит содержится в:
родитель
617c7586fe
коммит
bba0dc9575
3 изменённых файлов: 22 добавлений и 49 удалений
23
.github/workflows/build-macos.yml
предоставленный
23
.github/workflows/build-macos.yml
предоставленный
|
@ -16,10 +16,6 @@ jobs:
|
||||||
name: build-macos
|
name: build-macos
|
||||||
runs-on: macos-11
|
runs-on: macos-11
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: '1.18.1'
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
@ -35,6 +31,11 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
|
- name: Install Go
|
||||||
|
uses: actions/setup-go@v3
|
||||||
|
with:
|
||||||
|
go-version: '1.18.1'
|
||||||
|
cache: true
|
||||||
- name: Cache LLVM source
|
- name: Cache LLVM source
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-llvm-source
|
id: cache-llvm-source
|
||||||
|
@ -104,23 +105,17 @@ jobs:
|
||||||
name: homebrew-install
|
name: homebrew-install
|
||||||
runs-on: macos-latest
|
runs-on: macos-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: '1.18'
|
|
||||||
- name: Install LLVM
|
- name: Install LLVM
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@14
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@14
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Cache Go
|
- name: Install Go
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
key: go-cache-macos-homebrew-v1-${{ hashFiles('go.mod') }}
|
go-version: '1.18'
|
||||||
path: |
|
cache: true
|
||||||
~/Library/Caches/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
- name: Build TinyGo
|
- name: Build TinyGo
|
||||||
run: go install
|
run: go install
|
||||||
- name: Check binary
|
- name: Check binary
|
||||||
|
|
34
.github/workflows/linux.yml
предоставленный
34
.github/workflows/linux.yml
предоставленный
|
@ -34,6 +34,7 @@ jobs:
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
|
# TODO: v2 until https://github.com/tinygo-org/tinygo/issues/3146
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.1'
|
go-version: '1.18.1'
|
||||||
|
@ -121,9 +122,10 @@ jobs:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.1'
|
go-version: '1.18.1'
|
||||||
|
cache: true
|
||||||
- name: Install wasmtime
|
- name: Install wasmtime
|
||||||
run: |
|
run: |
|
||||||
curl https://wasmtime.dev/install.sh -sSf | bash
|
curl https://wasmtime.dev/install.sh -sSf | bash
|
||||||
|
@ -173,9 +175,10 @@ jobs:
|
||||||
simavr \
|
simavr \
|
||||||
ninja-build
|
ninja-build
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.1'
|
go-version: '1.18.1'
|
||||||
|
cache: true
|
||||||
- name: Install Node.js
|
- name: Install Node.js
|
||||||
uses: actions/setup-node@v2
|
uses: actions/setup-node@v2
|
||||||
with:
|
with:
|
||||||
|
@ -184,13 +187,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
curl https://wasmtime.dev/install.sh -sSf | bash
|
curl https://wasmtime.dev/install.sh -sSf | bash
|
||||||
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
|
echo "$HOME/.wasmtime/bin" >> $GITHUB_PATH
|
||||||
- name: Cache Go
|
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
key: go-cache-linux-asserts-v1-${{ hashFiles('go.mod') }}
|
|
||||||
path: |
|
|
||||||
~/.cache/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
- name: Cache LLVM source
|
- name: Cache LLVM source
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-llvm-source
|
id: cache-llvm-source
|
||||||
|
@ -279,16 +275,10 @@ jobs:
|
||||||
g++-arm-linux-gnueabihf \
|
g++-arm-linux-gnueabihf \
|
||||||
libc6-dev-armhf-cross
|
libc6-dev-armhf-cross
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.1'
|
go-version: '1.18.1'
|
||||||
- name: Cache Go
|
cache: true
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
key: go-cache-linux-arm-v2-${{ hashFiles('go.mod') }}
|
|
||||||
path: |
|
|
||||||
~/.cache/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
- name: Cache LLVM source
|
- name: Cache LLVM source
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-llvm-source
|
id: cache-llvm-source
|
||||||
|
@ -385,16 +375,10 @@ jobs:
|
||||||
libc6-dev-arm64-cross \
|
libc6-dev-arm64-cross \
|
||||||
ninja-build
|
ninja-build
|
||||||
- name: Install Go
|
- name: Install Go
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.18.1'
|
go-version: '1.18.1'
|
||||||
- name: Cache Go
|
cache: true
|
||||||
uses: actions/cache@v3
|
|
||||||
with:
|
|
||||||
key: go-cache-linux-arm64-v2-${{ hashFiles('go.mod') }}
|
|
||||||
path: |
|
|
||||||
~/.cache/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
- name: Cache LLVM source
|
- name: Cache LLVM source
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-llvm-source
|
id: cache-llvm-source
|
||||||
|
|
14
.github/workflows/windows.yml
предоставленный
14
.github/workflows/windows.yml
предоставленный
|
@ -15,10 +15,6 @@ jobs:
|
||||||
build-windows:
|
build-windows:
|
||||||
runs-on: windows-2022
|
runs-on: windows-2022
|
||||||
steps:
|
steps:
|
||||||
- name: Install Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: '1.18.1'
|
|
||||||
- uses: brechtm/setup-scoop@v2
|
- uses: brechtm/setup-scoop@v2
|
||||||
with:
|
with:
|
||||||
scoop_update: 'false'
|
scoop_update: 'false'
|
||||||
|
@ -30,13 +26,11 @@ jobs:
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
- name: Cache Go
|
- name: Install Go
|
||||||
uses: actions/cache@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
key: go-cache-windows-v1-${{ hashFiles('go.mod') }}
|
go-version: '1.18.1'
|
||||||
path: |
|
cache: true
|
||||||
~/AppData/Local/go-build
|
|
||||||
~/go/pkg/mod
|
|
||||||
- name: Cache LLVM source
|
- name: Cache LLVM source
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
id: cache-llvm-source
|
id: cache-llvm-source
|
||||||
|
|
Загрузка…
Создание таблицы
Сослаться в новой задаче