From 66d0592655121ad5ff94005a2527e3b82572a0ea 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/actions/ubuntu.yml | 23 +++++++++++++++++++++++ .github/workflows/rust.yml | 20 +++++--------------- 2 files changed, 28 insertions(+), 15 deletions(-) create mode 100644 .github/actions/ubuntu.yml diff --git a/.github/actions/ubuntu.yml b/.github/actions/ubuntu.yml new file mode 100644 index 00000000..1ed6a326 --- /dev/null +++ b/.github/actions/ubuntu.yml @@ -0,0 +1,23 @@ +name: Ubuntu +description: Build ubuntu builds +runs: + using: "composite" + steps: + - 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..a767d53d 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -10,21 +10,11 @@ jobs: 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/actions/ubuntu.yml + - name: ls + run: ls -l app.zip + build_windows: runs-on: windows-latest steps: