Skip to content

Commit 828ddc4

Browse files
committed
initial commit
0 parents  commit 828ddc4

File tree

185 files changed

+38551
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

185 files changed

+38551
-0
lines changed

.dockerignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
target/
2+
.git/
3+
.gitignore
4+
.dockerignore
5+
*.md
6+
deploy.sh
7+
stackpit.toml
8+
*.db
9+
*.db-wal
10+
*.db-shm

.envrc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Guix development environment
2+
if [[ -d /run/current-system ]]; then
3+
eval "$(guix shell -m manifest.scm --search-paths)"
4+
export CC=gcc
5+
fi

.github/workflows/ci.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
8+
jobs:
9+
test:
10+
strategy:
11+
matrix:
12+
include:
13+
- features: sqlite
14+
os: ubuntu-latest
15+
- features: postgres
16+
os: ubuntu-latest
17+
runs-on: ${{ matrix.os }}
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- uses: dtolnay/rust-toolchain@stable
22+
with:
23+
components: clippy
24+
25+
- uses: Swatinem/rust-cache@v2
26+
27+
- name: Check
28+
run: cargo check --no-default-features --features ${{ matrix.features }}
29+
30+
- name: Clippy
31+
run: cargo clippy --no-default-features --features ${{ matrix.features }} -- -D warnings
32+
33+
- name: Test
34+
run: cargo test --no-default-features --features ${{ matrix.features }}

.github/workflows/publish.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Publish to crates.io
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
jobs:
9+
publish:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
14+
- uses: dtolnay/rust-toolchain@stable
15+
16+
- name: Run tests
17+
run: cargo test
18+
19+
- name: Publish to crates.io
20+
uses: katyo/publish-crates@v2
21+
with:
22+
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/release.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- "v*"
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- target: x86_64-apple-darwin
17+
os: macos-latest
18+
- target: aarch64-apple-darwin
19+
os: macos-latest
20+
- target: x86_64-unknown-linux-gnu
21+
os: ubuntu-latest
22+
runs-on: ${{ matrix.os }}
23+
steps:
24+
- uses: actions/checkout@v4
25+
26+
- uses: dtolnay/rust-toolchain@stable
27+
with:
28+
targets: ${{ matrix.target }}
29+
30+
- name: Build
31+
run: cargo build --release --target ${{ matrix.target }}
32+
33+
- name: Package
34+
run: |
35+
cd target/${{ matrix.target }}/release
36+
tar czf ../../../stackpit-${{ matrix.target }}.tar.gz stackpit
37+
cd ../../..
38+
shasum -a 256 stackpit-${{ matrix.target }}.tar.gz > stackpit-${{ matrix.target }}.tar.gz.sha256
39+
40+
- name: Upload artifacts
41+
uses: actions/upload-artifact@v4
42+
with:
43+
name: stackpit-${{ matrix.target }}
44+
path: |
45+
stackpit-${{ matrix.target }}.tar.gz
46+
stackpit-${{ matrix.target }}.tar.gz.sha256
47+
48+
deb:
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
53+
- uses: dtolnay/rust-toolchain@stable
54+
55+
- name: Install cargo-deb
56+
run: cargo install cargo-deb
57+
58+
- name: Build deb package
59+
run: cargo deb
60+
61+
- name: Upload deb artifact
62+
uses: actions/upload-artifact@v4
63+
with:
64+
name: stackpit-deb
65+
path: target/debian/*.deb
66+
67+
rpm:
68+
runs-on: ubuntu-latest
69+
steps:
70+
- uses: actions/checkout@v4
71+
72+
- uses: dtolnay/rust-toolchain@stable
73+
74+
- name: Install cargo-generate-rpm
75+
run: cargo install cargo-generate-rpm
76+
77+
- name: Build
78+
run: cargo build --release
79+
80+
- name: Build rpm package
81+
run: cargo generate-rpm
82+
83+
- name: Upload rpm artifact
84+
uses: actions/upload-artifact@v4
85+
with:
86+
name: stackpit-rpm
87+
path: target/generate-rpm/*.rpm
88+
89+
release:
90+
needs: [build, deb, rpm]
91+
runs-on: ubuntu-latest
92+
steps:
93+
- name: Download artifacts
94+
uses: actions/download-artifact@v4
95+
with:
96+
merge-multiple: true
97+
98+
- name: Create release
99+
uses: softprops/action-gh-release@v2
100+
with:
101+
generate_release_notes: true
102+
draft: false
103+
files: |
104+
stackpit-*.tar.gz
105+
stackpit-*.tar.gz.sha256
106+
*.deb
107+
*.rpm

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
target
2+
*.db
3+
*.db-*
4+
stackpit.toml
5+
scripts/sentry-test-client/.venv
6+
deploy.sh

0 commit comments

Comments
 (0)