Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Desync build

Desync build #24

Workflow file for this run

name: Build desync
on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
jobs:
build:
name: Validate on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, windows-latest, macos-latest ]
timeout-minutes: 10
steps:
- name: Checkout desync
uses: actions/checkout@v2
with:
repository: V-Sekai/desync
fetch-depth: 0
- uses: actions/setup-go@v2
with:
go-version: '^1.15.6'
- uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- run: go test
- run: go build ./cmd/desync
- name: Rename to triplet scheme
id: rename
run: |
TRIPLET=""
if [[ '${{ matrix.os }}' == 'windows-latest' ]]; then
TRIPLET="x86_64-pc-windows-gnu"
elif [[ '${{ matrix.os }}' == 'macos-latest' ]]; then
TRIPLET="x86_64-apple-darwin"
else
TRIPLET="x86_64-unknown-linux-gnu"
fi
mv ./desync ./desync-$TRIPLET
echo "::set-output name=path::./desync-$TRIPLET"
- name: Upload desync binary
uses: actions/upload-artifact@v2
with:
name: desync-${{ matrix.os }}
path: ${{ steps.rename.outputs.path }}