ci: build -> test/release

This commit is contained in:
🪞👃🪞 2025-04-11 23:58:10 +03:00
parent 92271f727d
commit ee6f24515f
2 changed files with 56 additions and 1 deletions

View file

@ -0,0 +1,56 @@
on: [tag]
jobs:
build:
container: { image: "alpine:edge" }
steps:
- name: install deps
run: apk add --no-cache nodejs tree rustup git just cloc build-base clang20-dev pipewire-jack-dev lilv-dev serd-dev
- id: cache
name: cache restore
uses: https://data.forgejo.org/actions/cache/restore@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- run: git clone --depth 1 --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .
- run: whoami && pwd && tree
- run: cloc src/ && cloc .
- run: rustup-init -y
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv
#- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just doc
- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test
- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just build-release
- name: cache save
uses: https://data.forgejo.org/actions/cache/save@v4
with:
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
- run: tree && mkdir -p .release && mv -v target/release/tek .release
- name: publish release
uses: https://data.forgejo.org/actions/forgejo-release@v2.6.0
with:
url: "https://codeberg.org"
direction: upload
tag: "${{ github.ref_name }}"
sha: "${{ github.sha }}"
release-dir: .release
override: true
verbose: true
#hide-archive-link: true
#token: ${{ secrets.TOKEN }}
#release-notes-assistant: true

View file

@ -26,7 +26,6 @@ jobs:
- run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv - run: source "$HOME/.cargo/env" && rustup install nightly && rustup default nightly && cargo version -vv
#- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just doc #- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just doc
- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test - run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just test
- run: source "$HOME/.cargo/env" && RUSTFLAGS="-Ctarget-feature=-crt-static" just build-release
- run: tree - run: tree
- name: cache save - name: cache save