Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

on:
push:
branches: [master]
pull_request:

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
CARGO_TERM_COLOR: always

jobs:
build-test:
name: build & test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-14]
steps:
- uses: actions/checkout@v4

- name: Install Linux GUI dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev xorg-dev

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy

- uses: Swatinem/rust-cache@v2

- name: Format check
run: cargo fmt --all --check

- name: Clippy
run: cargo clippy --workspace --all-targets -- -D warnings

- name: Test
run: cargo test --workspace

- name: Build
run: cargo build --workspace
50 changes: 50 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Release

on:
push:
tags: ["v*"]

permissions:
contents: write

env:
CARGO_TERM_COLOR: always

jobs:
release:
name: ${{ matrix.target }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-gnu
- os: macos-14
target: aarch64-apple-darwin
steps:
- uses: actions/checkout@v4

- name: Install Linux GUI dependencies
if: runner.os == 'Linux'
run: sudo apt-get update && sudo apt-get install -y libgl1-mesa-dev xorg-dev

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}

- uses: Swatinem/rust-cache@v2

- name: Build release binary
run: cargo build --release --locked --target ${{ matrix.target }} --bin tickerwall

- name: Package
run: |
tar -czf "tickerwall-${{ matrix.target }}.tar.gz" \
-C "target/${{ matrix.target }}/release" tickerwall

- name: Upload to release
uses: softprops/action-gh-release@v2
with:
files: tickerwall-${{ matrix.target }}.tar.gz
18 changes: 2 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
.DS_Store

# Binaries for programs and plugins
*.exe
*.exe~
*.dll
*.so
*.dylib

# Test binary, built with `go test -c`
*.test

# Output of the go coverage tool, specifically when used with LiteIDE
*.out

# Dependency directories (remove the comment below to include it)
# vendor/
logos/
# Rust build output (Cargo.lock is committed for the workspace binary)
/target/
Loading
Loading