feat: setup actions, create select action, create action command #332
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: rust | |
| env: | |
| CARGO_TERM_COLOR: always | |
| on: | |
| push: | |
| branches: main | |
| pull_request: | |
| branches: null | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| settings: | |
| - host: macos-latest | |
| target: x86_64-apple-darwin | |
| - host: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| - host: ubuntu-latest | |
| target: x86_64-unknown-linux-gnu | |
| - host: ubuntu-24.04-arm | |
| target: aarch64-unknown-linux-gnu | |
| # - host: ubuntu-24.04-arm | |
| # target: aarch64-unknown-linux-musl | |
| - host: macos-latest | |
| target: aarch64-apple-darwin | |
| name: build - ${{ matrix.settings.target }} | |
| runs-on: ${{ matrix.settings.host }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache cargo | |
| uses: Swatinem/rust-cache@v2 | |
| - name: Run sccache-cache | |
| uses: mozilla-actions/sccache-action@v0.0.9 | |
| - name: Install | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.settings.target }} | |
| - name: Cache cargo | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry/index/ | |
| ~/.cargo/registry/cache/ | |
| ~/.cargo/git/db/ | |
| .cargo-cache | |
| target/ | |
| key: ${{ matrix.settings.target }}-cargo-${{ matrix.settings.host }} | |
| - name: Run tests | |
| run: cargo test --verbose --profile release --target=${{ matrix.settings.target }} | |
| - name: Build | |
| run: cargo build --verbose --bins --profile release --target=${{ matrix.settings.target }} | |
| - name: List | |
| run: ls -R | |
| shell: bash | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ contains(matrix.settings.target, 'windows') }} | |
| with: | |
| name: binary-${{ matrix.settings.target }} | |
| path: target/${{ matrix.settings.target }}/release/oxvg.exe | |
| if-no-files-found: error | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| if: ${{ !contains(matrix.settings.target, 'windows') }} | |
| with: | |
| name: binary-${{ matrix.settings.target }} | |
| path: target/${{ matrix.settings.target }}/release/oxvg | |
| if-no-files-found: error |