Release v0.1.2 #16
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
| on: | |
| release: | |
| types: [created] | |
| workflow_dispatch: | |
| name: Build and release | |
| jobs: | |
| build_and_test: | |
| name: Rust project - latest | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| targets: | |
| - x86_64-unknown-linux-gnu | |
| - x86_64-unknown-linux-musl | |
| # TODO: fixme | |
| # - aarch64-unknown-linux-gnu | |
| # - aarch64-unknown-linux-musl | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Add dependencies (ssl-dev, etc) | |
| run: sudo apt-get install libssl-dev pkg-config | |
| - name: Install aarch64-buildroot-linux-gnu-gcc for relevant target | |
| if: matrix.targets == 'aarch64-unknown-linux-gnu' | |
| run: sudo apt-get install gcc-aarch64-linux-gnu | |
| - name: Install aarch64-buildroot-linux-musl-gcc for relevant target | |
| if: matrix.targets == 'aarch64-unknown-linux-musl' | |
| run: sudo apt-get install gcc-aarch64-linux-musl | |
| - name: Install musl-gcc for relevant target | |
| if: matrix.targets == 'x86_64-unknown-linux-musl' | |
| run: sudo apt-get install musl-tools | |
| - run: rustup target add ${{ matrix.targets }} | |
| - run: rustup update stable && rustup default stable | |
| - run: cargo build --verbose --target ${{ matrix.targets }} | |
| - name: release | |
| if: github.event_name == 'release' | |
| uses: actions/create-release@v1 | |
| id: create_release | |
| with: | |
| draft: false | |
| prerelease: false | |
| release_name: ${{ steps.version.outputs.version }} | |
| tag_name: ${{ github.ref }} | |
| body_path: CHANGELOG.md | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: upload | |
| if: github.event_name == 'release' | |
| uses: actions/upload-release-asset@v1 | |
| with: | |
| upload_url: ${{ steps.create_release.outputs.upload_url }} | |
| asset_path: target/${{ matrix.targets }}/kernelci-storage | |
| asset_name: kernelci-storage-${{ matrix.targets }} | |
| asset_content_type: application/octet-stream | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - name: Upload artifacts if not a release | |
| if: github.event_name != 'release' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: kernelci-storage-${{ matrix.targets }}-${{ github.sha }} | |
| path: target/${{ matrix.targets }}/kernelci-storage | |