Skip to content

Bump h2 from 0.3.17 to 0.3.24 #46

Bump h2 from 0.3.17 to 0.3.24

Bump h2 from 0.3.17 to 0.3.24 #46

name: "Build On Windows"
on: [push]
jobs:
build: # job id, can be any string
# Job name is Build And Publish
name: Build
# This job runs on Linux
strategy:
matrix:
os: [windows-latest]
rust: [stable]
target: [x86_64-pc-windows-msvc, i686-pc-windows-msvc]
# x86_64-pc-windows-gnu, i686-pc-windows-gnu,
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache cargo modules
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust }}
target: ${{ matrix.target }}
default: true
override: true
components: "rustfmt, clippy, cargo, rust-docs"
- name: Cargo Release build
uses: actions-rs/cargo@v1
if: ${{ matrix.target != 'x86_64-pc-windows-gnu' }}
with:
use-cross: false
command: build
args: --target ${{ matrix.target }} --release --jobs 2 --verbose
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --release --verbose --target ${{ matrix.target }} --bin wxwork_robotd
- name: Prepare package
shell: pwsh
if: ${{ contains(github.ref, 'refs/tags/') }}
run: |
cd "$ENV:GITHUB_WORKSPACE/target/${{ matrix.target }}/release/"
if ( Test-Path "tools" ) { Remove-Item -Recurse -Force "tools" }
if ( Test-Path "etc" ) { Remove-Item -Recurse -Force "etc" }
New-Item -Force -ItemType Directory "bin"
Copy-Item -Force -Recurse "../../../tools" "./"
Copy-Item -Force -Recurse "../../../etc" "./"
Copy-Item -Force "wxwork_robotd.exe" "bin/"
if ( Test-Path "${{ matrix.target }}.zip" ) { Remove-Item -Force "${{ matrix.target }}.zip" }
Compress-Archive -DestinationPath "${{ matrix.target }}.zip" -Path etc,bin,tools
cd "$ENV:GITHUB_WORKSPACE"
- uses: xresloader/upload-to-github-release@master
if: ${{ contains(github.ref, 'refs/tags/') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
file: "target/${{ matrix.target }}/release/${{ matrix.target }}.zip"
tags: true
draft: false
prerelease: false
overwrite: true