Improve building

This commit is contained in:
Tobias Reisinger 2025-07-09 01:09:54 +02:00
parent 7694bf365c
commit c493a92246
Signed by: serguzim
GPG key ID: 13AD60C237A28DFE
2 changed files with 14 additions and 1 deletions

View file

@ -5,17 +5,25 @@ on:
jobs: jobs:
build-upload: build-upload:
runs-on: docker runs-on: docker
container:
image: node:20-bookworm
steps: steps:
- uses: https://code.forgejo.org/actions/checkout@v3 - uses: https://code.forgejo.org/actions/checkout@v3
- id: install-dependencies - id: install-dependencies
run: | run: |
curl https://sh.rustup.rs -sSf | sh -s -- -y curl https://sh.rustup.rs -sSf | sh -s -- -y
apt update
apt install -y ruby ruby-dev
gem install bashly
shell: bash shell: bash
- id: cargo-build-release - id: cargo-build-release
run: | run: |
source "$HOME/.cargo/env" source "$HOME/.cargo/env"
cargo build --release cargo build --release
shell: bash shell: bash
- id: bashly-generate
run: |
bashly generate
- id: copy-ts-control-artificat - id: copy-ts-control-artificat
run: | run: |
cp ${{ github.workspace }}/target/release/teamspeak-query-lib /tmp/artifacts cp ${{ github.workspace }}/target/release/teamspeak-query-lib /tmp/artifacts

View file

@ -4,13 +4,18 @@ INSTALL_DIR = $(HOME)/.local/bin
export PATH := target/debug:$(PATH) export PATH := target/debug:$(PATH)
.FORCE:
build: build:
@cargo build @cargo build
run: build run: build
./ts-control ./ts-control
install: ./ts-control: .FORCE
bashly generate
install: ./ts-control
mkdir -p "$(INSTALL_DIR)" mkdir -p "$(INSTALL_DIR)"
cargo build --release cargo build --release
install -Dm755 -t "$(INSTALL_DIR)" \ install -Dm755 -t "$(INSTALL_DIR)" \