mirror of
https://github.com/ratspeak/rsLXMF
synced 2026-11-27 13:52:18 +00:00
Initial commit: v0.9.0 release
This commit is contained in:
commit
2dae6a4d5e
33 files changed
+23578
No files matched your search
@@ -0,0 +1,64 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
test:
|
||||
name: Test (${{ matrix.os }})
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: rsLXMF
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/rsReticulum
|
||||
ref: main
|
||||
path: rsReticulum
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: rsLXMF -> target
|
||||
- name: Install system deps
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev pkg-config
|
||||
- run: cargo test --workspace
|
||||
working-directory: rsLXMF
|
||||
|
||||
lint:
|
||||
name: Lint
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
path: rsLXMF
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/rsReticulum
|
||||
ref: main
|
||||
path: rsReticulum
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: rsLXMF -> target
|
||||
- name: Install system deps
|
||||
run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev pkg-config
|
||||
- run: cargo fmt --all -- --check
|
||||
working-directory: rsLXMF
|
||||
- run: cargo clippy --workspace --all-targets -- -D warnings
|
||||
working-directory: rsLXMF
|
||||
@@ -0,0 +1,111 @@
|
||||
name: Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "v*"
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tag_name:
|
||||
description: "Release tag to create or update"
|
||||
required: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
env:
|
||||
RELEASE_TAG: ${{ github.event.inputs.tag_name || github.ref_name }}
|
||||
PACKAGE_ROOT: rsLXMF
|
||||
LXMF_BINS: lxmd-rs
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build ${{ matrix.artifact_suffix }}
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
artifact_suffix: linux-x86_64
|
||||
archive: tar.gz
|
||||
- os: macos-latest
|
||||
artifact_suffix: macos
|
||||
archive: tar.gz
|
||||
- os: windows-latest
|
||||
artifact_suffix: windows-x86_64
|
||||
archive: zip
|
||||
runs-on: ${{ matrix.os }}
|
||||
env:
|
||||
ARCHIVE_NAME: rsLXMF-${{ github.event.inputs.tag_name || github.ref_name }}-${{ matrix.artifact_suffix }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
path: rsLXMF
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ github.repository_owner }}/rsReticulum
|
||||
ref: ${{ env.RELEASE_TAG }}
|
||||
path: rsReticulum
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- uses: Swatinem/rust-cache@v2
|
||||
with:
|
||||
workspaces: rsLXMF -> target
|
||||
- name: Install system deps (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libudev-dev libdbus-1-dev pkg-config
|
||||
- name: Build release binaries
|
||||
working-directory: rsLXMF
|
||||
run: cargo build -p lxmf-tools --release --bins
|
||||
- name: Stage archive contents
|
||||
shell: bash
|
||||
working-directory: rsLXMF
|
||||
run: |
|
||||
set -euo pipefail
|
||||
mkdir -p "dist/${PACKAGE_ROOT}/bin"
|
||||
for bin in ${LXMF_BINS}; do
|
||||
if [[ "${RUNNER_OS}" == "Windows" ]]; then
|
||||
cp "target/release/${bin}.exe" "dist/${PACKAGE_ROOT}/bin/${bin}.exe"
|
||||
else
|
||||
cp "target/release/${bin}" "dist/${PACKAGE_ROOT}/bin/${bin}"
|
||||
fi
|
||||
done
|
||||
cp README.md LICENSE "dist/${PACKAGE_ROOT}/"
|
||||
- name: Create tar archive
|
||||
if: runner.os != 'Windows'
|
||||
shell: bash
|
||||
working-directory: rsLXMF
|
||||
run: tar -czf "${ARCHIVE_NAME}.tar.gz" -C dist "${PACKAGE_ROOT}"
|
||||
- name: Create zip archive
|
||||
if: runner.os == 'Windows'
|
||||
shell: pwsh
|
||||
working-directory: rsLXMF
|
||||
run: Compress-Archive -Path "dist/${env:PACKAGE_ROOT}" -DestinationPath "${env:ARCHIVE_NAME}.zip" -Force
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ env.ARCHIVE_NAME }}
|
||||
path: |
|
||||
rsLXMF/*.tar.gz
|
||||
rsLXMF/*.zip
|
||||
if-no-files-found: error
|
||||
|
||||
publish:
|
||||
name: Publish GitHub release
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: release-assets
|
||||
merge-multiple: true
|
||||
- name: Generate checksums
|
||||
working-directory: release-assets
|
||||
run: sha256sum * > SHA256SUMS
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
tag_name: ${{ env.RELEASE_TAG }}
|
||||
prerelease: true
|
||||
files: release-assets/*
|
||||
Reference in new issue
Block a user