From ceb1b23264d6573fa8303336b9fd92c47ffe30b6 Mon Sep 17 00:00:00 2001 From: technobaboo Date: Tue, 11 Jul 2023 10:53:31 -0700 Subject: [PATCH] feat: ci take 2 --- .github/workflows/build.yml | 28 ++++++++++++++++++++++++++ .github/workflows/release.yml | 37 +++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a3e95cd --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,28 @@ +name: Build + +on: + push: + branches: + - '*' + +jobs: + build_and_package: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install runtime dependencies + run: sudo apt install -y --no-install-recommends libxkbcommon-dev libstdc++6 libopenxr-dev libx11-dev libxfixes-dev libgl1-mesa-dev libegl1-mesa-dev libgbm-dev libfontconfig-dev libjsoncpp-dev libxcb1-dev libglx-dev libdrm-dev libwayland-dev libfreetype-dev libpng-dev + + - name: Install build dependencies + run: sudo apt install -y --no-install-recommends cmake ninja + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Build server + run: cargo build --release \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..6c54c7f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,37 @@ +name: Build appimage + +on: + push: + tags: + - '*' + +jobs: + build_and_package: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Install runtime dependencies + run: sudo apt install -y --no-install-recommends libxkbcommon-dev libstdc++6 libopenxr-dev libx11-dev libxfixes-dev libgl1-mesa-dev libegl1-mesa-dev libgbm-dev libfontconfig-dev libjsoncpp-dev libxcb1-dev libglx-dev libdrm-dev libwayland-dev libfreetype-dev libpng-dev + + - name: Install build dependencies + run: sudo apt install -y --no-install-recommends cmake ninja + + - name: Set up Rust + uses: actions-rs/toolchain@v1 + with: + toolchain: stable + + - name: Install cargo-appimage + run: cargo install cargo-appimage + + - name: Generate AppImage + run: cargo appimage + + - name: Upload AppImage + uses: actions/upload-artifact@v2 + with: + name: appimage + path: ./*.AppImage \ No newline at end of file