diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3c64042 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,47 @@ +name: CI + +on: + push: + branches: [master] + # See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet + tags: + - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+-*" + + pull_request: + branches: [master] + +concurrency: + group: ci-${{ github.ref }}-1 + # Cancel previous builds for pull requests only. + cancel-in-progress: ${{ github.event_name == 'pull_request' }} + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: [ + macos-13, # x64 + macos-14, # ARM + ubuntu-latest, # x64 + buildjet-2vcpu-ubuntu-2204-arm, # ARM + windows-latest, + ] + + runs-on: ${{matrix.os}} + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: NPM install + run: npm ci + + - name: Build + run: npx rescript