Create and switch branches in process, completing Track G #590
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: Rust-CI | |
| on: | |
| workflow_dispatch: | |
| # schedule: | |
| # - cron: "17 17 * * *" | |
| pull_request: | |
| # types: [labeled, review_requested] | |
| push: | |
| tags: | |
| - "v*.*.*" | |
| jobs: | |
| test-macos: | |
| name: Test on macOS | |
| if: github.actor == 'iesahin' | |
| runs-on: macos-latest | |
| timeout-minutes: 50 | |
| strategy: | |
| matrix: | |
| build: [stable] | |
| include: | |
| - build: stable | |
| rust: stable | |
| # rust: nightly-2024-01-01 | |
| ## for submitters other than me, I'll add another job here. | |
| # benches: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install required packages | |
| run: | | |
| brew install s3cmd | |
| brew install ripgrep | |
| brew install tree | |
| brew install lsd | |
| brew install python3 | |
| brew install minio/stable/mc | |
| brew install rclone | |
| - name: Git config for automated Git tests | |
| run: git config --global user.name 'Xvc Rabbit' && git config --global user.email 'rabbit@xvc.dev' && git config --global init.defaultBranch main | |
| - name: Install rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust || 'stable' }} | |
| - name: Build debug | |
| run: cargo build ${{ matrix.build-args }} | |
| env: | |
| RUSTFLAGS: "-A dead_code" | |
| - name: Add xvc to PATH | |
| run: echo "${GITHUB_WORKSPACE}/target/debug" >> $GITHUB_PATH | |
| # - name: Print contents of $GITHUB_WORKSPACE | |
| # run: tree $GITHUB_WORKSPACE | |
| - name: Check if xvc is in PATH | |
| # run: tree $GITHUB_WORKSPACE && xvc --version | |
| run: xvc --version | |
| - name: Run Current Dev Tests | |
| run: $GITHUB_WORKSPACE/run-tests.zsh | |
| - name: Test all benches | |
| if: matrix.benches | |
| run: cargo test --benches ${{ matrix.features }} | |
| test-linux: | |
| name: Test on Linux | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 50 | |
| if: github.actor == 'iesahin' | |
| strategy: | |
| matrix: | |
| build: [stable] | |
| include: | |
| - build: stable | |
| rust: stable | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Install required packages | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y s3cmd ripgrep tree python3 rclone | |
| # Install lsd | |
| wget https://github.com/Peltoche/lsd/releases/download/0.23.1/lsd_0.23.1_amd64.deb | |
| sudo dpkg -i lsd_0.23.1_amd64.deb | |
| # Install minio client | |
| wget https://dl.min.io/client/mc/release/linux-amd64/mc | |
| chmod +x mc | |
| sudo mv mc /usr/local/bin/ | |
| - name: Git config for automated Git tests | |
| run: git config --global user.name 'Xvc Rabbit' && git config --global user.email 'rabbit@xvc.dev' && git config --global init.defaultBranch main | |
| - name: Install rust | |
| uses: dtolnay/rust-toolchain@master | |
| with: | |
| toolchain: ${{ matrix.rust || 'stable' }} | |
| - name: Build debug | |
| run: cargo build ${{ matrix.build-args }} | |
| env: | |
| RUSTFLAGS: "-A dead_code" | |
| - name: Add xvc to PATH | |
| run: echo "${GITHUB_WORKSPACE}/target/debug" >> $GITHUB_PATH | |
| - name: Check if xvc is in PATH | |
| run: xvc --version | |
| - name: Test | |
| run: cargo test --workspace |