diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 019451787..eadc0da9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,12 +1,6 @@ name: CI on: workflow_dispatch: - pull_request: - push: - branches: - - master - tags: - - '*' env: FORCE_COLOR: 1 concurrency: diff --git a/.github/workflows/prebuild.yml b/.github/workflows/prebuild.yml new file mode 100644 index 000000000..f345baa97 --- /dev/null +++ b/.github/workflows/prebuild.yml @@ -0,0 +1,64 @@ +name: prebuild +on: + workflow_dispatch: + inputs: {} +env: + FORCE_COLOR: 1 +concurrency: + group: ${{ github.head_ref || github.run_id }} + cancel-in-progress: true +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - windows-latest + host: + - x64 + target: + - arm64 + node: + - 20 + name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }}) + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node }} + architecture: ${{ matrix.host }} + + - name: Add setuptools for Python 3.12 (temp) + run: pip install setuptools + + - name: Add msbuild to PATH + uses: microsoft/setup-msbuild@v1.3 + if: contains(matrix.os, 'windows') + with: + msbuild-architecture: ${{ matrix.host }} + + - name: Install dependencies + run: yarn install --ignore-scripts + + - name: Add env vars + shell: bash + run: | + echo "V=1" >> $GITHUB_ENV + + if [ "${{ matrix.target }}" = "x86" ]; then + echo "TARGET=ia32" >> $GITHUB_ENV + else + echo "TARGET=${{ matrix.target }}" >> $GITHUB_ENV + fi + + - name: Build binaries + run: yarn prebuild -a ${{ env.TARGET }} + + - name: Upload binaries to commit artifacts + uses: actions/upload-artifact@v3 + with: + name: prebuilt-binaries + path: prebuilds/* + retention-days: 7 +