From af709eb4d9694344443d2849161c405c7719ba1b Mon Sep 17 00:00:00 2001 From: extrawurst <776816+extrawurst@users.noreply.github.com> Date: Thu, 20 Mar 2025 19:19:31 +0100 Subject: [PATCH] simpler linux ci (#9) --- .github/workflows/ci.yml | 69 ++++++++++++++++++++++++++++++++++ build/steamosdevkit/.gitignore | 1 + build/steamosdevkit/assets | 1 + 3 files changed, 71 insertions(+) create mode 100644 .github/workflows/ci.yml create mode 100644 build/steamosdevkit/.gitignore create mode 120000 build/steamosdevkit/assets diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..b33cd79 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,69 @@ +name: ci + +on: + pull_request: + push: + branches: ["master"] + +jobs: + debug: + runs-on: [self-hosted, linux] + steps: + - uses: actions/checkout@v4 + - uses: cargo-bins/cargo-binstall@main + - uses: extractions/setup-just@v1 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy, rustfmt + + - name: "Install and cache dependencies (Linux)" + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev + version: 1.0 + + - name: Build + run: | + cargo build --locked --target=x86_64-unknown-linux-gnu + + - name: Archive + run: | + cp target/x86_64-unknown-linux-gnu/debug/hedz_reloaded hedz_reloaded + tar -czf steamos-debug.tar.gz hedz_reloaded + + - uses: actions/upload-artifact@v4 + with: + name: steamos-debug.tar.gz + path: ./steamos-debug.tar.gz + + release: + runs-on: [self-hosted, linux] + steps: + - uses: actions/checkout@v4 + - uses: cargo-bins/cargo-binstall@main + - uses: extractions/setup-just@v1 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: stable + components: clippy, rustfmt + + - name: "Install and cache dependencies (Linux)" + uses: awalsh128/cache-apt-pkgs-action@latest + with: + packages: libasound2-dev libudev-dev libwayland-dev libxkbcommon-dev + version: 1.0 + + - name: Build + run: | + cargo build --release --locked --target=x86_64-unknown-linux-gnu + + - name: Archive + run: | + cp target/x86_64-unknown-linux-gnu/release/hedz_reloaded hedz_reloaded + tar -czf steamos.tar.gz hedz_reloaded + + - uses: actions/upload-artifact@v4 + with: + name: steamos.tar.gz + path: ./steamos.tar.gz \ No newline at end of file diff --git a/build/steamosdevkit/.gitignore b/build/steamosdevkit/.gitignore new file mode 100644 index 0000000..04ceab5 --- /dev/null +++ b/build/steamosdevkit/.gitignore @@ -0,0 +1 @@ +hedz_reloaded \ No newline at end of file diff --git a/build/steamosdevkit/assets b/build/steamosdevkit/assets new file mode 120000 index 0000000..41aef43 --- /dev/null +++ b/build/steamosdevkit/assets @@ -0,0 +1 @@ +../../assets \ No newline at end of file