Skip to content

v2.13.0.alpha

v2.13.0.alpha #643

Workflow file for this run

name: CI
on: [ push, pull_request ]
jobs:
lint-source-code:
name: Lint Source Code
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Dependencies
run: |
sudo apt clean
sudo apt update
sudo apt install xorg-dev libgtk-3-dev
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Lint
uses: golangci/golangci-lint-action@v6
with:
version: v1.59.1
build:
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-2019, macos-latest ]
include:
- os: ubuntu-latest
rust-target: 1.79-x86_64-unknown-linux-gnu
- os: windows-2019
rust-target: 1.79-x86_64-pc-windows-gnu
- os: macos-latest
rust-target: 1.79-x86_64-apple-darwin
runs-on: ${{ matrix.os }}
name: Build - ${{ matrix.os }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- if: contains(matrix.os, 'ubuntu')
name: Dependencies (Linux)
run: |
sudo apt clean
sudo apt update
sudo apt install xorg-dev libgtk-3-dev
- name: Setup Golang
uses: actions/setup-go@v5
with:
go-version-file: go.mod
architecture: x64
cache: true
- name: Setup Rust
run: |
rustup install ${{ matrix.rust-target }}
rustup default ${{ matrix.rust-target }}
- name: Setup Task
uses: arduino/setup-task@v2
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Cache Rust
uses: Swatinem/rust-cache@v2
with:
workspaces: third_party/sdmmparser/src
- if: contains(matrix.os, 'windows')
name: Pre Build (Windows)
run: task task_win:gen_syso
- name: Build
run: task build
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ runner.os }}
path: dst/*
if-no-files-found: error
release:
name: Release
runs-on: ubuntu-latest
needs: build
if: startsWith(github.ref, 'refs/tags/v') # if tag starts with "v"
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Setup Task
uses: arduino/setup-task@v2
with:
version: 3.x
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Download Release Files
uses: actions/download-artifact@v4
with:
path: dst/
- name: Prepare Release Files
run: task release-files
- name: Release
uses: softprops/action-gh-release@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
draft: true
prerelease: false
files: |
dst/bin/**
dst/archive/**