From aa91b9dd4e0fbbac8f4c843e6e6052bd2f6de726 Mon Sep 17 00:00:00 2001 From: arabian Date: Sat, 8 Nov 2025 22:36:34 +0300 Subject: [PATCH] add build workflow fix incorrect workflows dir add workflow_dispatch to release build add deps installation to release.yml fix release.yml not cloning submodules try to fix auto builds on windows another attemp to fix automatic building on windows one more attemp to fix automatic building on windows change cargo/bin path on windows fix windows builds test --- .github/workflows/release.yml | 72 +++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..665c151 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,72 @@ +name: Release Build + +on: + release: + types: [published] + workflow_dispatch: + +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install build dependencies (Linux) + if: runner.os == 'Linux' + run: sudo apt-get update && sudo apt-get install -y autoconf automake libtool + + - name: Install build dependencies (macOS) + if: runner.os == 'macOS' + run: brew install autoconf automake libtool + + - name: Install build dependencies (Windows) + if: runner.os == 'Windows' + uses: msys2/setup-msys2@v2 + with: + msystem: MINGW64 + update: true + install: autoconf automake libtool make m4 perl autotools + run: whereis aclocal + + - name: Install Rust + uses: dtolnay/rust-toolchain@stable + with: + toolchain: stable + + - name: Cache Cargo dependencies + uses: actions/cache@v4 + with: + path: | + ~/.cargo/registry + ~/.cargo/git + target + key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} + restore-keys: | + ${{ runner.os }}-cargo- + + - name: Build (Linux/macOS) + if: runner.os != 'Windows' + run: cargo build --release + + - name: Build (Windows) + if: runner.os == 'Windows' + shell: msys2 {0} + run: | + # ensure cargo is in PATH + export PATH=/c/Users/runneradmin/.cargo/bin:$PATH + # ensure mingw64 bin is in PATH + export PATH=/mingw64/bin:/usr/bin:$PATH + cargo build --release + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: build-${{ matrix.os }} + path: target/release/build_msp*