(Hopefully) add ARM support #4
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: Build and Release | |
| on: | |
| push: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| platform: [x86_64-unknown-linux-gnu, aarch64-unknown-linux-gnu] | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - name: Set up Rust | |
| uses: actions-rs/toolchain@v1 | |
| with: | |
| toolchain: stable | |
| target: ${{ matrix.platform }} | |
| override: true | |
| # Install cross-compilation tools if building for ARM | |
| - name: Install cross-compilation tools | |
| if: matrix.platform == 'aarch64-unknown-linux-gnu' | |
| run: | | |
| sudo apt update | |
| sudo apt install -y gcc-aarch64-linux-gnu | |
| - name: Build | |
| run: cargo build --release --target ${{ matrix.platform }} | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: KeyResolve-${{ matrix.platform }} | |
| path: target/${{ matrix.platform }}/release/KeyResolve | |
| # release: | |
| # needs: build | |
| # runs-on: ubuntu-latest | |
| # steps: | |
| # - name: Download artifacts | |
| # uses: actions/download-artifact@v4 | |
| # with: | |
| # path: ./dist | |
| # - name: Create GitHub Release | |
| # uses: ncipollo/release-action@v1 | |
| # with: | |
| # artifacts: ./dist/* | |
| # tag: ${{ github.ref_name }} |