diff --git a/.github/workflows/build-reusable.yaml b/.github/workflows/build-ci.yaml similarity index 57% rename from .github/workflows/build-reusable.yaml rename to .github/workflows/build-ci.yaml index 96b34170e..fe80a0ea8 100644 --- a/.github/workflows/build-reusable.yaml +++ b/.github/workflows/build-ci.yaml @@ -1,32 +1,19 @@ -name: Reusable Build Workflow +name: Build CI on: - workflow_call: + push: + branches: [main, develop] + workflow_dispatch: inputs: os: - required: true - type: string - description: "Operating system to build on" - ocaml_version: - required: false - type: string - default: "4.14.2" - description: "OCaml version to use" - cache-prefix: + description: 'OS to build on. If empty, builds on all supported OSes.' required: false + default: '' type: string - default: "" - description: "Cache prefix for the build" - build-wasm: - required: false - type: boolean - default: false - description: "Whether to build WASM targets" - rustflags: - required: false - type: string - default: "" - description: "Additional RUSTFLAGS to append (e.g., macOS-specific linker flags)" + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true env: CARGO_TERM_COLOR: always @@ -37,10 +24,12 @@ env: jobs: build: - timeout-minutes: 60 - runs-on: ${{ inputs.os }} + strategy: + matrix: + os: ${{ github.event.inputs.os && fromJSON(format('["{0}"]', github.event.inputs.os)) || fromJSON('["ubuntu-22.04", "ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14", "macos-15", "macos-latest"]') }} + runs-on: ${{ matrix.os }} env: - RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}" + RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ startsWith(matrix.os, 'macos') && '-C link-args=-Wl,-undefined,dynamic_lookup' || '' }}" steps: - name: Git checkout uses: actions/checkout@v5 @@ -51,13 +40,13 @@ jobs: - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: - ocaml_version: ${{ inputs.ocaml_version }} + ocaml_version: '4.14.2' - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: 1.84 - cache-prefix: build-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + cache-prefix: build-${{ matrix.os }}-${{ matrix.os }}-v0 - name: Release build run: make build-release @@ -80,10 +69,12 @@ jobs: echo "Build info verification passed!" build-tests: - timeout-minutes: 60 - runs-on: ${{ inputs.os }} + strategy: + matrix: + os: ${{ github.event.inputs.os && fromJSON(format('["{0}"]', github.event.inputs.os)) || fromJSON('["ubuntu-22.04", "ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14", "macos-15", "macos-latest"]') }} + runs-on: ${{ matrix.os }} env: - RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}" + RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ startsWith(matrix.os, 'macos') && '-C link-args=-Wl,-undefined,dynamic_lookup' || '' }}" steps: - name: Git checkout uses: actions/checkout@v5 @@ -94,22 +85,24 @@ jobs: - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: - ocaml_version: ${{ inputs.ocaml_version }} + ocaml_version: '4.14.2' - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: 1.84 - cache-prefix: build-tests-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + cache-prefix: build-tests-${{ matrix.os }}-${{ matrix.os }}-v0 - name: Build tests run: make build-tests build-tests-webrtc: - timeout-minutes: 60 - runs-on: ${{ inputs.os }} + strategy: + matrix: + os: ${{ github.event.inputs.os && fromJSON(format('["{0}"]', github.event.inputs.os)) || fromJSON('["ubuntu-22.04", "ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14", "macos-15", "macos-latest"]') }} + runs-on: ${{ matrix.os }} env: - RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}" + RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ startsWith(matrix.os, 'macos') && '-C link-args=-Wl,-undefined,dynamic_lookup' || '' }}" steps: - name: Git checkout uses: actions/checkout@v5 @@ -120,23 +113,25 @@ jobs: - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: - ocaml_version: ${{ inputs.ocaml_version }} + ocaml_version: '4.14.2' - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: 1.84 - cache-prefix: build-tests-webrtc-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + cache-prefix: build-tests-webrtc-${{ matrix.os }}-${{ matrix.os }}-v0 - name: Build tests run: make build-tests-webrtc build-benches: needs: [build] - timeout-minutes: 60 - runs-on: ${{ inputs.os }} + strategy: + matrix: + os: ${{ github.event.inputs.os && fromJSON(format('["{0}"]', github.event.inputs.os)) || fromJSON('["ubuntu-22.04", "ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14", "macos-15", "macos-latest"]') }} + runs-on: ${{ matrix.os }} env: - RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ inputs.rustflags }}" + RUSTFLAGS: "-C overflow-checks=off -C debug-assertions=off ${{ startsWith(matrix.os, 'macos') && '-C link-args=-Wl,-undefined,dynamic_lookup' || '' }}" steps: - name: Git checkout uses: actions/checkout@v5 @@ -147,21 +142,22 @@ jobs: - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: - ocaml_version: ${{ inputs.ocaml_version }} + ocaml_version: '4.14.2' - name: Setup Rust uses: ./.github/actions/setup-rust with: toolchain: 1.84 - cache-prefix: build-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + cache-prefix: build-${{ matrix.os }}-${{ matrix.os }}-v0 - name: Build benchmarks run: make build-benches build-wasm: - if: ${{ inputs.build-wasm }} - timeout-minutes: 60 - runs-on: ${{ inputs.os }} + strategy: + matrix: + os: ${{ github.event.inputs.os && fromJSON(format('["{0}"]', github.event.inputs.os)) || fromJSON('["ubuntu-22.04", "ubuntu-24.04", "ubuntu-24.04-arm", "macos-13", "macos-14", "macos-15", "macos-latest"]') }} + runs-on: ${{ matrix.os }} steps: - name: Git checkout uses: actions/checkout@v5 @@ -172,14 +168,14 @@ jobs: - name: Use shared OCaml setting up steps uses: ./.github/actions/setup-ocaml with: - ocaml_version: ${{ inputs.ocaml_version }} + ocaml_version: '4.14.2' - name: Setup WebAssembly environment uses: ./.github/actions/setup-wasm with: - cache-prefix: wasm-${{ inputs.os }}-${{ inputs.cache-prefix }}v0 + cache-prefix: wasm-${{ matrix.os }}-${{ matrix.os }}-v0 - name: Release build run: make build-wasm env: - RUSTFLAGS: "" + RUSTFLAGS: "" \ No newline at end of file diff --git a/.github/workflows/build-macos-13.yaml b/.github/workflows/build-macos-13.yaml deleted file mode 100644 index 2f63e177e..000000000 --- a/.github/workflows/build-macos-13.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build macOS 13 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: macos-13 - cache-prefix: macos-13- - build-wasm: true - rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup" diff --git a/.github/workflows/build-macos-14.yaml b/.github/workflows/build-macos-14.yaml deleted file mode 100644 index 6b30ac779..000000000 --- a/.github/workflows/build-macos-14.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build macOS 14 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: macos-14 - cache-prefix: macos-14- - build-wasm: true - rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup" diff --git a/.github/workflows/build-macos-15.yaml b/.github/workflows/build-macos-15.yaml deleted file mode 100644 index d9b35b193..000000000 --- a/.github/workflows/build-macos-15.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build macOS 15 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: macos-15 - cache-prefix: macos-15- - build-wasm: true - rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup" diff --git a/.github/workflows/build-macos-latest.yaml b/.github/workflows/build-macos-latest.yaml deleted file mode 100644 index f711bdca8..000000000 --- a/.github/workflows/build-macos-latest.yaml +++ /dev/null @@ -1,19 +0,0 @@ -name: Build macOS Latest - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: macos-latest - cache-prefix: macos-latest- - build-wasm: true - rustflags: "-C link-args=-Wl,-undefined,dynamic_lookup" diff --git a/.github/workflows/build-ubuntu-22-04.yaml b/.github/workflows/build-ubuntu-22-04.yaml deleted file mode 100644 index 008a3942e..000000000 --- a/.github/workflows/build-ubuntu-22-04.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build Ubuntu 22.04 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: ubuntu-22.04 - cache-prefix: ubuntu-22-04- - build-wasm: true diff --git a/.github/workflows/build-ubuntu-24-04-arm.yaml b/.github/workflows/build-ubuntu-24-04-arm.yaml deleted file mode 100644 index d40fe3fff..000000000 --- a/.github/workflows/build-ubuntu-24-04-arm.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build Ubuntu 24.04 ARM - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: ubuntu-24.04-arm - cache-prefix: ubuntu-24-04-arm- - build-wasm: true diff --git a/.github/workflows/build-ubuntu-24-04.yaml b/.github/workflows/build-ubuntu-24-04.yaml deleted file mode 100644 index 19a7f1fd4..000000000 --- a/.github/workflows/build-ubuntu-24-04.yaml +++ /dev/null @@ -1,18 +0,0 @@ -name: Build Ubuntu 24.04 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - build: - uses: ./.github/workflows/build-reusable.yaml - with: - os: ubuntu-24.04 - cache-prefix: ubuntu-24-04- - build-wasm: true diff --git a/.github/workflows/frontend-ci-test.yaml b/.github/workflows/frontend-ci-test.yaml new file mode 100644 index 000000000..14a1d9b96 --- /dev/null +++ b/.github/workflows/frontend-ci-test.yaml @@ -0,0 +1,17 @@ +name: Frontend CI Test + +on: + workflow_dispatch: + inputs: + os: + description: 'OS to build on.' + required: false + default: 'ubuntu-24.04' + type: string + +jobs: + test: + runs-on: ${{ github.event.inputs.os }} + steps: + - name: Echo + run: echo "Hello, world!" diff --git a/.github/workflows/frontend-ci.yaml b/.github/workflows/frontend-ci.yaml new file mode 100644 index 000000000..e78f9a425 --- /dev/null +++ b/.github/workflows/frontend-ci.yaml @@ -0,0 +1,45 @@ +name: Frontend CI + +on: + push: + branches: [main, develop] + pull_request: + workflow_dispatch: + inputs: + os: + description: 'OS to build on. If empty, builds on all supported OSes.' + required: false + default: '' + type: string + +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +jobs: + build: + strategy: + matrix: + os: ${{ github.event.inputs.os && fromJSON(format('["{0}"]', github.event.inputs.os)) || fromJSON('["ubuntu-22.04", "ubuntu-24.04-arm", "macos-13", "macos-14", "macos-15", "macos-latest"]') }} + runs-on: ${{ matrix.os }} + steps: + - name: Git checkout + uses: actions/checkout@v5 + + - name: Frontend build + uses: ./.github/actions/frontend-build + with: + test-build-commands: 'true' + + lint-and-test: + runs-on: ubuntu-24.04 + steps: + - name: Git checkout + uses: actions/checkout@v5 + + - name: Frontend build and test + uses: ./.github/actions/frontend-build + with: + run-prettier-check: 'true' + run-tests: 'true' + test-build-commands: 'false' diff --git a/.github/workflows/frontend-macos-13.yaml b/.github/workflows/frontend-macos-13.yaml deleted file mode 100644 index d1aa6784b..000000000 --- a/.github/workflows/frontend-macos-13.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Frontend macOS 13 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: macos-13 - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build - uses: ./.github/actions/frontend-build - with: - test-build-commands: 'true' \ No newline at end of file diff --git a/.github/workflows/frontend-macos-14.yaml b/.github/workflows/frontend-macos-14.yaml deleted file mode 100644 index ce4f180cb..000000000 --- a/.github/workflows/frontend-macos-14.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Frontend macOS 14 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: macos-14 - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build - uses: ./.github/actions/frontend-build - with: - test-build-commands: 'true' \ No newline at end of file diff --git a/.github/workflows/frontend-macos-15.yaml b/.github/workflows/frontend-macos-15.yaml deleted file mode 100644 index 64b6b5a63..000000000 --- a/.github/workflows/frontend-macos-15.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Frontend macOS 15 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: macos-15 - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build - uses: ./.github/actions/frontend-build - with: - test-build-commands: 'true' \ No newline at end of file diff --git a/.github/workflows/frontend-macos-latest.yaml b/.github/workflows/frontend-macos-latest.yaml deleted file mode 100644 index 69deada6c..000000000 --- a/.github/workflows/frontend-macos-latest.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Frontend macOS latest - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: macos-latest - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build - uses: ./.github/actions/frontend-build - with: - test-build-commands: 'true' \ No newline at end of file diff --git a/.github/workflows/frontend-ubuntu-22-04.yaml b/.github/workflows/frontend-ubuntu-22-04.yaml deleted file mode 100644 index e0b0f9c51..000000000 --- a/.github/workflows/frontend-ubuntu-22-04.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Frontend Ubuntu 22.04 - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: ubuntu-22.04 - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build - uses: ./.github/actions/frontend-build - with: - test-build-commands: 'true' \ No newline at end of file diff --git a/.github/workflows/frontend-ubuntu-24-04-arm.yaml b/.github/workflows/frontend-ubuntu-24-04-arm.yaml deleted file mode 100644 index d406fd224..000000000 --- a/.github/workflows/frontend-ubuntu-24-04-arm.yaml +++ /dev/null @@ -1,22 +0,0 @@ -name: Frontend Ubuntu 24.04 ARM - -on: - push: - branches: [main, develop] - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: ubuntu-24.04-arm - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build - uses: ./.github/actions/frontend-build - with: - test-build-commands: 'true' \ No newline at end of file diff --git a/.github/workflows/frontend.yaml b/.github/workflows/frontend.yaml deleted file mode 100644 index 1dac8ec7f..000000000 --- a/.github/workflows/frontend.yaml +++ /dev/null @@ -1,24 +0,0 @@ -name: Frontend CI -on: - push: - branches: [ main, develop ] - pull_request: - workflow_dispatch: - -concurrency: - group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} - cancel-in-progress: true - -jobs: - frontend: - runs-on: ubuntu-24.04 - steps: - - name: Git checkout - uses: actions/checkout@v5 - - - name: Frontend build and test - uses: ./.github/actions/frontend-build - with: - run-prettier-check: 'true' - run-tests: 'true' - test-build-commands: 'false'