Skip to content

Commit

Permalink
[CI] Move ubuntu build to reusable workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
PolyMeilex committed Mar 11, 2024
1 parent f4d29b6 commit d83acbf
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
19 changes: 1 addition & 18 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,7 @@ env:

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
uses: ./.github/workflows/ubuntu.yml
build_windows:
runs-on: windows-latest
steps:
Expand Down
25 changes: 25 additions & 0 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Ubuntu

on:
workflow_call

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

0 comments on commit d83acbf

Please sign in to comment.