Initial commit
CI / test (macos-latest) (push) Canceled after 0s
CI / test (ubuntu-latest) (push) Canceled after 0s
CI / test (windows-latest) (push) Canceled after 0s
CI / release (macos-latest, aarch64-apple-darwin) (push) Canceled after 0s
CI / release (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Canceled after 0s
CI / release (windows-latest, x86_64-pc-windows-msvc) (push) Canceled after 0s
CI / test (macos-latest) (push) Canceled after 0s
CI / test (ubuntu-latest) (push) Canceled after 0s
CI / test (windows-latest) (push) Canceled after 0s
CI / release (macos-latest, aarch64-apple-darwin) (push) Canceled after 0s
CI / release (ubuntu-latest, x86_64-unknown-linux-gnu) (push) Canceled after 0s
CI / release (windows-latest, x86_64-pc-windows-msvc) (push) Canceled after 0s
This commit is contained in:
commit
0d94f2bf2e
28 files changed
+11076
No files matched your search
@@ -0,0 +1,62 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
tags: ["v*"]
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
test:
|
||||
strategy:
|
||||
matrix:
|
||||
os: [ubuntu-latest, windows-latest, macos-latest]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
components: clippy, rustfmt
|
||||
- name: Linux GUI dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libxkbcommon-dev libgtk-3-dev
|
||||
- run: cargo fmt --check
|
||||
- run: cargo clippy --all-targets -- -D warnings
|
||||
- run: cargo test --release
|
||||
|
||||
release:
|
||||
if: startsWith(github.ref, 'refs/tags/v')
|
||||
needs: test
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-latest
|
||||
target: x86_64-unknown-linux-gnu
|
||||
- os: windows-latest
|
||||
target: x86_64-pc-windows-msvc
|
||||
- os: macos-latest
|
||||
target: aarch64-apple-darwin
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: dtolnay/rust-toolchain@stable
|
||||
- name: Linux GUI dependencies
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get update && sudo apt-get install -y libxkbcommon-dev libgtk-3-dev
|
||||
- run: cargo build --release --target ${{ matrix.target }}
|
||||
- name: Package
|
||||
shell: bash
|
||||
run: |
|
||||
name=logreadlite-${GITHUB_REF_NAME}-${{ matrix.target }}
|
||||
mkdir "$name"
|
||||
cp README.md "$name/"
|
||||
if [ "$RUNNER_OS" = "Windows" ]; then
|
||||
cp target/${{ matrix.target }}/release/logreadlite.exe "$name/"
|
||||
7z a "$name.zip" "$name"
|
||||
else
|
||||
cp target/${{ matrix.target }}/release/logreadlite "$name/"
|
||||
tar czf "$name.tar.gz" "$name"
|
||||
fi
|
||||
- uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: logreadlite-*.*
|
||||
Reference in new issue
Block a user