From 39cdf9e62e4713066fb981d22c5af1ab85836676 Mon Sep 17 00:00:00 2001 From: "K. S. Ernest (iFire) Lee" Date: Sun, 7 Apr 2024 09:03:23 -0700 Subject: [PATCH] Updated workflow to build desync --- .github/workflows/desync.yml | 59 ++++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/desync.yml diff --git a/.github/workflows/desync.yml b/.github/workflows/desync.yml new file mode 100644 index 000000000..51d8f3d14 --- /dev/null +++ b/.github/workflows/desync.yml @@ -0,0 +1,59 @@ +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 }}