|
| 1 | +name: Build |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: [main] |
| 6 | + pull_request: |
| 7 | + branches: [main] |
| 8 | + |
| 9 | +jobs: |
| 10 | + rust-plugin: |
| 11 | + name: Rust Plugin |
| 12 | + strategy: |
| 13 | + matrix: |
| 14 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 15 | + runs-on: ${{ matrix.os }} |
| 16 | + defaults: |
| 17 | + run: |
| 18 | + working-directory: plugin |
| 19 | + steps: |
| 20 | + - uses: actions/checkout@v4 |
| 21 | + |
| 22 | + - name: Install Rust |
| 23 | + uses: dtolnay/rust-toolchain@stable |
| 24 | + |
| 25 | + - name: Cache cargo |
| 26 | + uses: actions/cache@v4 |
| 27 | + with: |
| 28 | + path: | |
| 29 | + ~/.cargo/registry |
| 30 | + ~/.cargo/git |
| 31 | + plugin/target |
| 32 | + key: ${{ runner.os }}-cargo-${{ hashFiles('plugin/Cargo.lock') }} |
| 33 | + restore-keys: ${{ runner.os }}-cargo- |
| 34 | + |
| 35 | + - name: Install ALSA dev (Linux) |
| 36 | + if: runner.os == 'Linux' |
| 37 | + run: sudo apt-get update && sudo apt-get install -y libasound2-dev |
| 38 | + |
| 39 | + - name: Build VST3 plugin |
| 40 | + run: cargo build --release |
| 41 | + |
| 42 | + - name: Build standalone |
| 43 | + run: cargo build --release --features standalone --bin compose-vst-standalone |
| 44 | + |
| 45 | + - name: Upload plugin artifact |
| 46 | + uses: actions/upload-artifact@v4 |
| 47 | + with: |
| 48 | + name: plugin-${{ matrix.os }} |
| 49 | + path: | |
| 50 | + plugin/target/release/libcompose_vst_plugin.so |
| 51 | + plugin/target/release/libcompose_vst_plugin.dylib |
| 52 | + plugin/target/release/compose_vst_plugin.dll |
| 53 | + plugin/target/release/compose-vst-standalone* |
| 54 | + if-no-files-found: ignore |
| 55 | + |
| 56 | + compose-ui: |
| 57 | + name: Compose UI |
| 58 | + strategy: |
| 59 | + matrix: |
| 60 | + os: [ubuntu-latest, macos-latest, windows-latest] |
| 61 | + runs-on: ${{ matrix.os }} |
| 62 | + defaults: |
| 63 | + run: |
| 64 | + working-directory: ui |
| 65 | + steps: |
| 66 | + - uses: actions/checkout@v4 |
| 67 | + |
| 68 | + - name: Set up JDK 21 |
| 69 | + uses: actions/setup-java@v4 |
| 70 | + with: |
| 71 | + distribution: temurin |
| 72 | + java-version: 21 |
| 73 | + |
| 74 | + - name: Setup Gradle |
| 75 | + uses: gradle/actions/setup-gradle@v4 |
| 76 | + |
| 77 | + - name: Generate wrapper (if missing) |
| 78 | + run: gradle wrapper |
| 79 | + |
| 80 | + - name: Build |
| 81 | + run: ./gradlew build |
| 82 | + |
| 83 | + - name: Package |
| 84 | + run: ./gradlew packageReleaseDistributionForCurrentOS |
| 85 | + continue-on-error: true |
| 86 | + |
| 87 | + - name: Upload UI artifact |
| 88 | + uses: actions/upload-artifact@v4 |
| 89 | + with: |
| 90 | + name: ui-${{ matrix.os }} |
| 91 | + path: ui/build/compose/binaries/main-release/ |
| 92 | + if-no-files-found: ignore |
0 commit comments