@@ 0,0 1,83 @@
+---
+variables:
+ - &rust_arm64_target 'aarch64-unknown-linux-musl'
+ - &rust_amd64_target 'x86_64-unknown-linux-musl'
+ - &rust_win_target 'x86_64-pc-windows-gnu'
+ - &rust_toolchain 'nightly'
+
+pipeline:
+ fetch:
+ image: alpine:latest
+ commands:
+ - apk add ffmpeg unzip bash
+ - bash fetch-assets.sh
+ build-arm64:
+ image: codeberg.org/comcloudway/alpine-cross:latest-arm64
+ environment:
+ RUST_TOOLCHAIN: *rust_toolchain
+ RUST_TARGET: *rust_arm64_target
+ commands:
+ - apk update
+ - apk add curl gcc musl-dev alsa-lib-dev
+ - curl https://sh.rustup.rs -sSf | sh -s -- -y
+ - source $HOME/.cargo/env
+ - rustup toolchain install $RUST_TOOLCHAIN
+ - rustup default $RUST_TOOLCHAIN
+ - rustup target add $RUST_TARGET
+ - cargo update
+ - cargo build --release --target $RUST_TARGET
+ - mv target/$RUST_TARGET/release/little_town LittleTown-arm64-musl
+ when:
+ event: [tag, deployment]
+ build-amd64:
+ image: codeberg.org/comcloudway/alpine-cross:latest-amd64
+ environment:
+ RUST_TOOLCHAIN: *rust_toolchain
+ RUST_TARGET: *rust_amd64_target
+ commands:
+ - apk update
+ - apk add curl gcc musl-dev alsa-lib-dev
+ - curl https://sh.rustup.rs -sSf | sh -s -- -y
+ - source $HOME/.cargo/env
+ - rustup toolchain install $RUST_TOOLCHAIN
+ - rustup default $RUST_TOOLCHAIN
+ - rustup target add $RUST_TARGET
+ - cargo update
+ - cargo build --release --target $RUST_TARGET
+ - mv target/$RUST_TARGET/release/little_town LittleTown-amd64-musl
+ when:
+ event: [tag, deployment]
+ build-win:
+ image: codeberg.org/comcloudway/alpine-cross:latest-amd64
+ environment:
+ RUST_TOOLCHAIN: *rust_toolchain
+ RUST_TARGET: *rust_win_target
+ commands:
+ - apk update
+ - apk add curl mingw-w64-gcc gcc musl-dev alsa-lib-dev
+ - curl https://sh.rustup.rs -sSf | sh -s -- -y
+ - source $HOME/.cargo/env
+ - rustup toolchain install $RUST_TOOLCHAIN
+ - rustup default $RUST_TOOLCHAIN
+ - rustup target add $RUST_TARGET
+ - cargo update
+ - cargo build --release --target $RUST_TARGET
+ - mv target/$RUST_TARGET/release/little_town LittleTown-amd64-win
+ when:
+ event: [tag, deployment]
+ publish:
+ image: woodpeckerci/plugin-gitea-release
+ settings:
+ base_url: https://codeberg.org
+ title: "$CI_COMMIT_TAG"
+ notes: "$CI_COMMIT_MESSAGE"
+ files:
+ - $CI_WORKSPACE/LittleTown-arm64-musl
+ - $CI_WORKSPACE/LittleTown-amd64-musl
+ api_key:
+ from_secret: cb_token
+ when:
+ event: tag
+
+depends_on:
+ - check