Build for macOS and Windows + add more release artifacts #41
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 | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| env: | |
| CARGO_TERM_COLOR: always | |
| R2V: 6.0.8 | |
| jobs: | |
| build-linux: | |
| name: Build (Linux) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gawk binutils build-essential | |
| - name: Install radare2 | |
| run: | | |
| wget https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2_${{env.R2V}}_amd64.deb | |
| wget https://github.com/radareorg/radare2/releases/download/${{env.R2V}}/radare2-dev_${{env.R2V}}_amd64.deb | |
| sudo dpkg -i radare2_${{env.R2V}}_amd64.deb | |
| sudo dpkg -i radare2-dev_${{env.R2V}}_amd64.deb | |
| - name: Build | |
| run: cargo build --verbose --release | |
| - name: Run tests | |
| run: cargo test --workspace --verbose --release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: radius2-linux-x86_64 | |
| path: target/release/radius2 | |
| build-macos: | |
| name: Build (macOS) | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install radare2 | |
| run: | | |
| brew install radare2 | |
| - name: Build | |
| run: CMAKE_POLICY_VERSION_MINIMUM=3.5 cargo build --verbose --release | |
| - name: Run tests | |
| run: cargo test --workspace --verbose --release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: radius2-macos-x86_64 | |
| path: target/release/radius2 | |
| build-windows: | |
| name: Build (Windows) | |
| runs-on: windows-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install radare2 | |
| run: | | |
| choco install radare2 -y | |
| - name: Build | |
| run: cargo build --verbose --release | |
| - name: Run tests | |
| run: cargo test --workspace --verbose --release | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: radius2-windows-x86_64 | |
| path: target/release/radius2.exe |