Skip to content

Commit

Permalink
fix: ci cache
Browse files Browse the repository at this point in the history
Signed-off-by: gfanton <8671905+gfanton@users.noreply.github.com>
  • Loading branch information
gfanton committed Nov 28, 2022
1 parent ecee9c8 commit 7039c4d
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 10 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
name: Build iOS pods
runs-on: macos-latest
timeout-minutes: 60
strategy:
matrix:
golang:
- 1.18
steps:
- name: Checkout changes
uses: actions/checkout@v2
Expand All @@ -21,7 +25,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: ${{ matrix.golang }}

- name: Set GOPATH in env
run: |
Expand All @@ -44,7 +48,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go/go.sum') }}
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('go/go.sum') }}

- name: Install Go mod
if: steps.cache.outputs.cache-hit != 'true'
Expand Down
18 changes: 14 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,14 +69,18 @@ jobs:
name: Lint Java/Android
runs-on: macos-latest
timeout-minutes: 20
strategy:
matrix:
golang:
- 1.18
steps:
- name: Checkout changes
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: ${{ matrix.golang }}

- name: Set GOPATH in env
run: |
Expand All @@ -91,7 +95,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go/go.sum') }}
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('go/go.sum') }}

- name: Install Go mod
if: steps.cache.outputs.cache-hit != 'true'
Expand All @@ -112,7 +116,8 @@ jobs:
echo "TARGET_SDK=$($GET_BIN $GET_KEY)" >> $GITHUB_ENV
- name: Install Android SDK
run: SDK_MAN=$HOME/Library/Android/sdk/tools/bin/sdkmanager;
run: |
SDK_MAN=$HOME/Library/Android/sdk/tools/bin/sdkmanager;
BTOOLS=$($SDK_MAN --list | grep "build-tools;$TARGET_SDK");
BTOOL=$(echo $BTOOLS | tail -n1 | cut -d'|' -f1 | tr -d ' ');
PLATFORMS=$($SDK_MAN --list | grep "platforms;android-$TARGET_SDK");
Expand Down Expand Up @@ -150,14 +155,19 @@ jobs:
name: Lint Golang
runs-on: ubuntu-latest
timeout-minutes: 5
strategy:
matrix:
golang:
- 1.18

steps:
- name: Checkout changes
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.18
go-version: ${{ matrix.golang }}

- name: Install GolangCI-Lint
working-directory: go
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ jobs:
name: Create release and publish
runs-on: macos-latest
timeout-minutes: 60
strategy:
matrix:
golang:
- 1.18
steps:
- name: Checkout changes
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.16
go-version: ${{ matrix.golang }}

- name: Set GOPATH in env
run: |
Expand All @@ -40,7 +44,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go/go.sum') }}
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('go/go.sum') }}

- name: Install Go mod
if: steps.cache.outputs.cache-hit != 'true'
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,18 @@ jobs:
name: Test and build Go Core
runs-on: macos-latest
timeout-minutes: 30
strategy:
matrix:
golang:
- 1.18
steps:
- name: Checkout changes
uses: actions/checkout@v2

- name: Install Go
uses: actions/setup-go@v1
with:
go-version: 1.16
go-version: ${{ matrix.golang }}

- name: Set GOPATH in env
run: |
Expand All @@ -32,7 +36,7 @@ jobs:
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('go/go.sum') }}
key: ${{ runner.os }}-go-${{ matrix.golang }}-${{ hashFiles('go/go.sum') }}

- name: Install Go mod
if: steps.cache.outputs.cache-hit != 'true'
Expand Down

0 comments on commit 7039c4d

Please sign in to comment.