From ee70d1b63b2f78597f11046d3494dc81a74d26c8 Mon Sep 17 00:00:00 2001 From: Namilskyy Date: Wed, 5 Nov 2025 18:31:14 +0300 Subject: Added makepkg.yml and fixed rust.yml --- .github/workflows/makepkg.yml | 37 +++++++++++++++++++++++++++++++++++++ .github/workflows/rust.yml | 32 ++++++-------------------------- 2 files changed, 43 insertions(+), 26 deletions(-) create mode 100644 .github/workflows/makepkg.yml (limited to '.github') diff --git a/.github/workflows/makepkg.yml b/.github/workflows/makepkg.yml new file mode 100644 index 0000000..c0c270f --- /dev/null +++ b/.github/workflows/makepkg.yml @@ -0,0 +1,37 @@ +name: Rust + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + build: + + runs-on: archlinux-latest + + steps: + + - uses: actions/checkout@v4 + - uses: docker://archlinux:latest + - name: Manual build test + run: cargo build --verbose + + - name: Cargo tests + run: cargo test --verbose + + name: Test makepkg build + with: + args: | + bash -c " + pacman -Sy --noconfirm base-devel git alsa-lib libx11 rustup && + useradd -m builder && + chown -R builder:builder /github/workspace && + cd /github/workspace/aur && + sudo -u builder bash -c ' + rustup default stable && + makepkg -sf --noconfirm --nocheck --syncdeps'" \ No newline at end of file diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index b609a8f..bd332d1 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -13,36 +13,16 @@ jobs: build: runs-on: ubuntu-latest strategy: - matrix: - os: [ubuntu, archlinux] + os: ubuntu steps: - uses: actions/checkout@v4 - - name: Setup environment (Ubuntu) - if: matrix.os == 'ubuntu' - run: | - sudo apt update - sudo apt install -y libasound2-dev libx11-dev + - name: Setup environment + run: apt install -y libasound2-dev libx11-dev - - name: Test makepkg build (Arch) - if: matrix.os == 'archlinux' - uses: docker://archlinux:latest - with: - args: | - bash -c " - pacman -Sy --noconfirm base-devel git alsa-lib libx11 rustup && - useradd -m builder && - chown -R builder:builder /github/workspace && - cd /github/workspace/aur && - sudo -u builder bash -c ' - rustup default stable && - makepkg -sf --noconfirm --nocheck --syncdeps'" - - - name: Build (Ubuntu) - if: matrix.os == 'ubuntu' + - name: Build run: cargo build --verbose --release - - name: Test (Ubuntu) - if: matrix.os == 'ubuntu' - run: cargo test --verbose + - name: Test + run: cargo test --verbose \ No newline at end of file -- cgit v1.2.3