56 lines
1.5 KiB
YAML
56 lines
1.5 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
name: Build - ${{ matrix.platform }}
|
|
runs-on: ${{ matrix.os }}
|
|
strategy:
|
|
matrix:
|
|
include:
|
|
- platform: linux
|
|
os: gitea-runner
|
|
target: x86_64-unknown-linux-gnu
|
|
artifact_name: rlogg-linux-x86_64
|
|
binary_extension: ""
|
|
# - platform: macos
|
|
# os: macos-latest
|
|
# target: x86_64-apple-darwin
|
|
# artifact_name: rlogg-macos-x86_64
|
|
# binary_extension: ""
|
|
# - platform: windows
|
|
# os: windows-latest
|
|
# target: x86_64-pc-windows-msvc
|
|
# artifact_name: rlogg-windows-x86_64
|
|
# binary_extension: ".exe"
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Rust
|
|
uses: actions-rust-lang/setup-rust-toolchain@v1
|
|
with:
|
|
target: ${{ matrix.target }}
|
|
|
|
- name: Build release binary
|
|
run: cargo build --release --target ${{ matrix.target }}
|
|
|
|
- name: Prepare artifact
|
|
shell: bash
|
|
run: |
|
|
mkdir -p dist
|
|
cp target/${{ matrix.target }}/release/rlogg${{ matrix.binary_extension }} dist/${{ matrix.artifact_name }}${{ matrix.binary_extension }}
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: ${{ matrix.artifact_name }}
|
|
path: dist/${{ matrix.artifact_name }}${{ matrix.binary_extension }}
|
|
retention-days: 14
|