From 581a21dc5288237f8184af8fbfb866df32b73f0e Mon Sep 17 00:00:00 2001 From: Jakob Meier Date: Sun, 26 Feb 2023 15:37:11 +0100 Subject: [PATCH] Added sourcehut CI --- .build.yml | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++ README.md | 20 +++++++++----------- 2 files changed, 61 insertions(+), 11 deletions(-) create mode 100644 .build.yml diff --git a/.build.yml b/.build.yml new file mode 100644 index 0000000..b8b3823 --- /dev/null +++ b/.build.yml @@ -0,0 +1,52 @@ +image: alpine/edge +sources: + - https://git.sr.ht/~comcloudway/little_town +packages: + - mingw-w64-gcc + - wget + - clang + - alsa-lib-dev +artifacts: + - ./LittleTown-amd64-musl + - ./LittleTown-aarch64-musl + - ./LittleTown-amd64-gnu + - ./LittleTown-aarch64-gnu + - ./LittleTown.exe +tasks: + - setup: | + curl https://sh.rustup.rs -sSf | sh -s -- -y + source $HOME/.cargo/env + rustup toolchain install nightly + rustup default nightly + - fetch-assets: | + cd little_town + ./fetch-assets.sh + - build-amd64-musl: | + source $HOME/.cargo/env + cd little_town + cargo build --release --target x86_64-unknown-linux-musl + mv target/x86_64-unknown-linux-musl/release/little_town ../LittleTown-amd64-musl + - build-amd64-gnu: | + source $HOME/.cargo/env + cd little_town + rustup target add x86_64-unknown-linux-gnu + cargo build --release --target x86_64-unknown-linux-gnu + mv target/x86_64-unknown-linux-gnu/release/little_town ../LittleTown-amd64-gnu + - build-aarch64-musl: | + source $HOME/.cargo/env + cd little_town + rustup target add aarch64-unknown-linux-musl + cargo build --release --target aarch64-unknown-linux-musl + mv target/aarch64-unknown-linux-musl/release/little_town ../LittleTown-aarch64-musl + - build-aarch64-gnu: | + source $HOME/.cargo/env + cd little_town + rustup target add aarch64-unknown-linux-gnu + cargo build --release --target aarch64-unknown-linux-gnu + mv target/aarch64-unknown-linux-gnu/release/little_town ../LittleTown-aarch64-gnu + - build-amd64-win: | + source $HOME/.cargo/env + cd little_town + rustup target add x86_64-pc-windows-gnu + cargo build --release --target x86_64-pc-windows-gnu + mv target/x86_64-pc-windows-gnu/release/little_town.exe ../LittleTown.exe diff --git a/README.md b/README.md index 6a70256..1278a4e 100644 --- a/README.md +++ b/README.md @@ -9,22 +9,20 @@ with this 2D game ## Screenshot ![img](./screenshot.png) - ## Building -### Requirements -- cargo -- rustup -### Steps 1. Install rust using [rustup](https://www.rust-lang.org/tools/install) 2. Clone this repo: - - git clone https://codeberg.org/comcloudway/little_town - - cd little_town + ```bash + git clone https://codeberg.org/comcloudway/little_town + cd little_town + ``` + 3. Build the binary using cargo: - - cargo build --release + ```bash + cargo build --release + ``` 4. The output binary can be found in the `target` folder. + ## Credits The Assets were created by [Kenney](https://kenney.nl/) and are licensed under [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/). -- 2.38.5