Skip to content

Commit

Permalink
use dependency caching of the setup-go action
Browse files Browse the repository at this point in the history
  • Loading branch information
ftl committed May 16, 2023
1 parent 527cf3d commit 85aa7cb
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 22 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,26 +20,18 @@ jobs:
- name: Install Linux packages
run: sudo apt update && sudo apt install -y --no-install-recommends libgtk-3-0 libgtk-3-dev libpango-1.0-0 libpango1.0-dev libpangocairo-1.0-0

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '1.20'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Get Gtk version and the environment
run: pkg-config --modversion gtk+-3.0;env

- name: Caching build artifacts and modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}

- name: Build
id: build
run: |
Expand Down
14 changes: 3 additions & 11 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,20 @@ jobs:
- name: Install Linux packages
run: sudo apt update && sudo apt install -y --no-install-recommends libgtk-3-0 libgtk-3-dev libpango-1.0-0 libpango1.0-dev libpangocairo-1.0-0

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '1.20'
id: go

- name: Check out code into the Go module directory
uses: actions/checkout@v3

- name: Get Gtk version and the environment
run: |
pkg-config --modversion gtk+-3.0
env
- name: Caching build artifacts and modules
uses: actions/cache@v3
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-modules-${{ hashFiles('**/go.sum') }}

- name: Build
id: build
run: |
Expand Down
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ clean:
deps:
go get -v -t -d ./...

generate:
go generate ./core/pb

test:
go test -v -timeout=30s ./...

Expand Down

0 comments on commit 85aa7cb

Please sign in to comment.