From 735ee4d608abe01a667bba6116243a0537cca746 Mon Sep 17 00:00:00 2001 From: PolyMeilex Date: Mon, 11 Mar 2024 19:43:38 +0100 Subject: [PATCH] [CI] Move ubuntu build to reusable workflow --- .github/ubuntu/action.yml | 24 ++++++++++++++++++++++++ .github/workflows/rust.yml | 21 +++++---------------- 2 files changed, 29 insertions(+), 16 deletions(-) create mode 100644 .github/ubuntu/action.yml diff --git a/.github/ubuntu/action.yml b/.github/ubuntu/action.yml new file mode 100644 index 00000000..54b106b5 --- /dev/null +++ b/.github/ubuntu/action.yml @@ -0,0 +1,24 @@ +name: Ubuntu +description: Build ubuntu builds +runs: + using: "composite" + steps: + - uses: actions/checkout@v2 + - name: Install alsa + shell: bash + run: sudo apt update && sudo apt install libasound2-dev libgtk-3-dev + - uses: Swatinem/rust-cache@v1 + - uses: actions-rs/cargo@v1 + with: + command: build + args: --release + - name: Chmod +x + shell: bash + run: chmod +x target/release/neothesia + - name: zip binary + shell: bash + run: zip -rj app.zip target/release/neothesia + - uses: actions/upload-artifact@v2 + with: + name: ubuntu-artifact + path: app.zip diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 71fa24f9..66819353 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -9,22 +9,11 @@ jobs: build_ubuntu: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 - - name: Install alsa - run: sudo apt update && sudo apt install libasound2-dev libgtk-3-dev - - uses: Swatinem/rust-cache@v1 - - uses: actions-rs/cargo@v1 - with: - command: build - args: --release - - name: Chmod +x - run: chmod +x target/release/neothesia - - name: zip binary - run: zip -rj app.zip target/release/neothesia - - uses: actions/upload-artifact@v2 - with: - name: ubuntu-artifact - path: app.zip + - id: Build + uses: ./.github/ubuntu + - name: ls + run: ls -l app.zip + build_windows: runs-on: windows-latest steps: