Fix artifacts download path for napi artifacts command #25
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - develop | |
| pull_request: | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: linux-ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - host: linux-ubuntu-latest | |
| target: aarch64-unknown-linux-gnu | |
| - host: windows-server-latest | |
| target: x86_64-pc-windows-msvc | |
| name: Build - ${{ matrix.settings.target }} | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: ${{ matrix.settings.host }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install Rust (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install Rust (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe | |
| .\rustup-init.exe -y --default-toolchain stable | |
| echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| shell: powershell | |
| - name: Add Rust target | |
| run: rustup target add ${{ matrix.settings.target }} | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| target/ | |
| key: ${{ matrix.settings.target }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| - name: Install cross-compilation tools (Linux ARM64) | |
| if: matrix.settings.target == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build -- --target ${{ matrix.settings.target }} | |
| env: | |
| CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: bindings-${{ matrix.settings.target }} | |
| path: '*.node' | |
| if-no-files-found: error | |
| test: | |
| name: Test Node.js ${{ matrix.node }} - ${{ matrix.os }} | |
| runs-on: | |
| group: databricks-protected-runner-group | |
| labels: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [linux-ubuntu-latest, windows-server-latest] | |
| node: ['16', '18', '20'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js ${{ matrix.node }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node }} | |
| cache: 'npm' | |
| - name: Install Rust (Unix) | |
| if: runner.os != 'Windows' | |
| run: | | |
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Install Rust (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| Invoke-WebRequest -Uri https://win.rustup.rs/x86_64 -OutFile rustup-init.exe | |
| .\rustup-init.exe -y --default-toolchain stable | |
| echo "$env:USERPROFILE\.cargo\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | |
| shell: powershell | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build | |
| run: npm run build:debug | |
| - name: Test | |
| run: npm run test:unit |