From 05000007bff461a554294cad827ae76a9a6db8e9 Mon Sep 17 00:00:00 2001 From: darkstack <1835601+darkstack@users.noreply.github.com> Date: Sun, 30 Mar 2025 21:36:26 +0200 Subject: [PATCH] Build --- .gitea/workflows/build.yaml | 51 +++++++++++++++++++++++++++++++++++++ src/main.rs | 5 ++-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .gitea/workflows/build.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..b808f1d --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,51 @@ +name: Build App +run-name: ${{ gitea.actor }} is building +on: [push] + +jobs: + Build: + runs-on: ubuntu-latest-real + steps: + - name: Update + run: | + sudo apt-get update -y -qq + sudo apt-get install -y build-essential git make zip libsdl2-dev libsdl2-2.0-0 libsdl2-net-dev libsdl2-mixer-dev libsdl2-image-dev libsdl2-gfx-dev libsdl2-ttf-dev + sudo sh -c "echo '192.168.1.253 descartes.local' >> /etc/hosts" + sudo sh -c "echo '192.168.1.253 build.ladose.net' >> /etc/hosts" + sudo curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y + sudo -E $HOME/.cargo/bin/rustup target add aarch64-unknown-linux-gnu + + - name: GetDNS + run: | + cat /etc/resolv.conf + + - run: echo "Build." + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Build + run: | + . "$HOME/.cargo/env" + cargo build --release + cargo build --release --target=aarch64-unknown-linux-gnu + - name: Zip file + run: | + zip -rj build.zip ./target/release/ + zip -rj build-Aarch64.zip ./target/release/ + - name: Upload Artifact + uses: actions/upload-artifact@v3 + with: + path: build-linux64.zip + name: build-linux64.zip + retention-days: 30 + overwrite: true + - name: Release + if: github.ref_name == 'master' + uses: akkuman/gitea-release-action@v1 + env: + with: + tag_name: release-${{ steps.date.outputs.date }} + files: |- + build-winx64.zip + build-linux64.zip + diff --git a/src/main.rs b/src/main.rs index b70f6f4..01bc0d9 100644 --- a/src/main.rs +++ b/src/main.rs @@ -24,7 +24,8 @@ pub struct Config { smash_key: String, font_size: u16, font_size_departure : u16, - margin: u32 + margin: u32, + tournament_image: Option } @@ -39,7 +40,7 @@ struct Line<'a> { impl Config { fn new() -> Self { - Self { tournament: String::new(), update: Some(1),fullscreen:Some(false), smash_key: String::new(), font_size: 30 , font_size_departure : 45, margin: 10 } + Self { tournament: String::new(), update: Some(1),fullscreen:Some(false), smash_key: String::new(), font_size: 30 , font_size_departure : 45, margin: 10,tournament_image: None } } }