Skip to content

- add: complex type encode and decode methods #36

- add: complex type encode and decode methods

- add: complex type encode and decode methods #36

Workflow file for this run

name: Rust
on: [push]
env:
CARGO_TERM_COLOR: always
RELEASE_TAG: idl-latest
jobs:
linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Get processor arch
run: echo "PROCESSOR_ARCH=`uname -p`" >> $GITHUB_ENV
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Prepare Release
run: tar --transform 's/.*\///g' -zcvf ${{github.workspace}}/${{ runner.os }}-${{ env.PROCESSOR_ARCH }}-packet_generator.tar.gz target/*/packet_generator
- name: Upload linux build
uses: actions/upload-artifact@v4
with:
name: linux_build
path: ${{github.workspace}}/${{ runner.os }}-${{ env.PROCESSOR_ARCH }}-packet_generator.tar.gz
windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --release --verbose
- name: Run tests
run: cargo test --verbose
- name: Prepare Release
run: |
copy-item ${{github.workspace}}\target\release\packet_generator.exe -destination ${{github.workspace}}\packet_generator.exe
7z a ${{github.workspace}}/windows-amd64-packet_generator.zip ${{github.workspace}}\packet_generator.exe
- name: Upload windows build
uses: actions/upload-artifact@v4
with:
name: windows_build
path: ${{github.workspace}}/windows-amd64-packet_generator.zip
release:
runs-on: ubuntu-latest
needs: [linux, windows]
if: github.ref == 'refs/heads/master'
steps:
- name: Download linux build
uses: actions/download-artifact@v4
with:
name: linux_build
- name: Download windows build
uses: actions/download-artifact@v4
with:
name: windows_build
- name: Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
omitBodyDuringUpdate: true
omitNameDuringUpdate: true
replacesArtifacts: true
body: latest packet_generator build
artifacts: "*-packet_generator.tar.gz,*-packet_generator.zip"
tag: ${{env.RELEASE_TAG}}
token: ${{ secrets.GITHUB_TOKEN }}