mirror of
https://github.com/esimov/pigo-wasm-demos.git
synced 2025-12-24 12:47:56 +08:00
55 lines
1.3 KiB
YAML
55 lines
1.3 KiB
YAML
name: CI
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
name: Build
|
|
strategy:
|
|
matrix:
|
|
go-version: [~1.13, ~1.14]
|
|
os: [ubuntu-latest, macos-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
env:
|
|
GO111MODULE: "on"
|
|
steps:
|
|
- name: Install Go
|
|
uses: actions/setup-go@v2
|
|
with:
|
|
go-version: ${{ matrix.go-version }}
|
|
|
|
- name: Cache-Go
|
|
uses: actions/cache@v1
|
|
with:
|
|
path: |
|
|
~/go/pkg/mod # Module download cache
|
|
~/.cache/go-build # Build cache (Linux)
|
|
~/Library/Caches/go-build # Build cache (Mac)
|
|
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
|
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
|
|
- name: Download Go modules
|
|
run: go mod download
|
|
|
|
- name: Install Linux Dependencies
|
|
if: matrix.os == 'ubuntu-latest'
|
|
run: |
|
|
sudo apt-get install -y xdg-utils
|
|
|
|
- name: Run Makefile
|
|
id: makefile
|
|
run: |
|
|
make demo1
|
|
make demo2
|
|
make demo3
|
|
make demo4
|
|
make demo5
|
|
continue-on-error: true
|
|
|
|
- name: Check on failures
|
|
if: steps.makefile.outputs.status == 'failure'
|
|
run: exit 1 |