Added stat function to Smbhandle
#144
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
| # This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node | |
| # For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | |
| name: CI | |
| on: | |
| push: | |
| branches: [ "*" ] | |
| pull_request: | |
| branches: [ "*" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| runs-on: ${{ matrix.settings.host }} | |
| permissions: | |
| contents: write | |
| packages: write | |
| strategy: | |
| matrix: | |
| settings: | |
| - host: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| runtests: true | |
| - host: ubuntu-22.04 | |
| target: aarch64-unknown-linux-gnu | |
| runtests: false | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| runtests: true | |
| - host: macos-latest | |
| target: x86_64-apple-darwin | |
| runtests: false | |
| steps: | |
| - name: macos deps | |
| if: runner.os == 'macOS' | |
| shell: bash | |
| run: | | |
| brew install samba | |
| - name: linux deps | |
| if: runner.os == 'Linux' | |
| shell: bash | |
| run: | | |
| sudo apt-get update && sudo apt-get -y install samba \ | |
| libc6-dev-amd64-cross libc6-dev-arm64-cross \ | |
| crossbuild-essential-arm64 crossbuild-essential-amd64 \ | |
| gcc-aarch64-linux-gnu \ | |
| binfmt-support binutils binutils-aarch64-linux-gnu | |
| - uses: actions/checkout@v4 | |
| - uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| rustflags: "" | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'yarn' | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@netapplabs' | |
| - name: Prepare yarn | |
| run: yarn install | |
| - name: Build | |
| run: yarn build --target ${{ matrix.settings.target }} | |
| - name: Test | |
| if: ${{ matrix.settings.runtests }} | |
| run: yarn test | |
| - name: Upload node module | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: smb-js-node-${{ matrix.settings.host }}-${{ matrix.settings.target }} | |
| path: | | |
| smb-js.*.node | |
| lib | |
| publish: | |
| runs-on: ubuntu-22.04 | |
| if: ${{ github.ref == 'refs/heads/main' }} | |
| permissions: | |
| contents: write | |
| packages: write | |
| needs: build | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20.x | |
| cache: 'yarn' | |
| registry-url: 'https://npm.pkg.github.com' | |
| scope: '@netapplabs' | |
| - name: Download Artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: smb-js-node-* | |
| merge-multiple: true | |
| - name: Setup git | |
| run: | | |
| git config --global user.name 'github-actions[bot]' | |
| git config --global user.email 'github-actions[bot]@users.noreply.github.com' | |
| - name: Bump version | |
| run: npx standard-version | |
| - name: Publish Artifacts | |
| run: npm publish --ignore-scripts | |
| env: | |
| NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Commit and push version bump | |
| run: | | |
| git push --follow-tags | |