fix: safely convert micros to tv_usec #38
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: | |
| - master | |
| pull_request: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| components: clippy | |
| - name: Run lint | |
| run: make lint | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| - name: Run tests | |
| run: make test | |
| build-matrix: | |
| name: Build (${{ matrix.os }}-${{ matrix.arch }}) | |
| runs-on: ${{ matrix.runner }} | |
| needs: | |
| - lint | |
| - test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - os: darwin | |
| arch: arm64 | |
| runner: macos-14 | |
| target: aarch64-apple-darwin | |
| - os: darwin | |
| arch: amd64 | |
| runner: macos-15-intel | |
| target: x86_64-apple-darwin | |
| - os: linux | |
| arch: amd64 | |
| runner: ubuntu-24.04 | |
| target: x86_64-unknown-linux-gnu | |
| - os: linux | |
| arch: arm64 | |
| runner: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Rust | |
| uses: actions-rust-lang/setup-rust-toolchain@v1 | |
| with: | |
| target: ${{ matrix.target }} | |
| - name: Build binary | |
| env: | |
| OS: ${{ matrix.os }} | |
| ARCH: ${{ matrix.arch }} | |
| TARGET: ${{ matrix.target }} | |
| run: | | |
| mkdir -p "dist/repomop_${OS}_${ARCH}" | |
| cargo build --release --locked --package repomop --target "${TARGET}" | |
| cp "target/${TARGET}/release/repomop" "dist/repomop_${OS}_${ARCH}/repomop" | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: repomop_${{ matrix.os }}_${{ matrix.arch }} | |
| path: dist/repomop_${{ matrix.os }}_${{ matrix.arch }}/repomop | |
| if-no-files-found: error |