Compare commits
9 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 82bf4b6ced | |||
| f21b74485e | |||
| e3b54f1a21 | |||
| 604b82216b | |||
| 709e7bee2a | |||
| 5a5805d47f | |||
| aaa2d582f0 | |||
| 7d5d19df71 | |||
| 1f1b0abf21 |
67
.gitea/workflows/ci.yaml
Normal file
67
.gitea/workflows/ci.yaml
Normal file
@@ -0,0 +1,67 @@
|
||||
name: Gitea CI
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'main'
|
||||
- 'dev'
|
||||
jobs:
|
||||
test:
|
||||
name: Run Tests
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: rust:slim
|
||||
steps:
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
apt-get update -yq
|
||||
apt-get install -yq git g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev nodejs libssl-dev
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache Cargo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
- name: Run Tests
|
||||
run: cargo test --verbose --workspace --package pomomon-garden
|
||||
build:
|
||||
name: Build Linux
|
||||
needs: test
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: rust:slim
|
||||
steps:
|
||||
- name: Install System Dependencies
|
||||
run: |
|
||||
apt-get update -yq
|
||||
apt-get install -yq git g++ pkg-config libx11-dev libasound2-dev libudev-dev libxkbcommon-x11-0 libwayland-dev nodejs libssl-dev
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Cache Cargo
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: |
|
||||
~/.cargo/bin/
|
||||
~/.cargo/registry/index/
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-cargo-
|
||||
- name: Build Release
|
||||
run: cargo build --release --target x86_64-unknown-linux-gnu
|
||||
- name: Get Short SHA
|
||||
id: slug
|
||||
run: echo "sha8=$(echo ${GITHUB_SHA} | cut -c1-8)" >> $GITHUB_OUTPUT
|
||||
- name: Upload Artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pomomon-garden-linux-x86_64-${{ steps.slug.outputs.sha8 }}
|
||||
path: target/x86_64-unknown-linux-gnu/release/pomomon-garden
|
||||
retention-days: 14
|
||||
Reference in New Issue
Block a user