Update hyper; implement static file serving myself #22
Workflow file for this run
This file contains 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
# Builds and (in the future tests) pull requests | |
name: Pull Request | |
on: | |
pull_request: | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Cancel existing executions when new commits are pushed onto the branch | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
timeout-minutes: 30 | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE | |
- uses: actions/checkout@v3 | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- uses: leafo/gh-actions-lua@v10 | |
with: | |
luaVersion: "luajit-2.1.0-beta3" | |
- name: Install Rust (Stable) | |
run: | |
curl https://sh.rustup.rs -sSf | sh -s -- -y | |
- name: Cargo Build | |
run: cargo build --release | |
- name: Cargo Build (Windows 32 bit) | |
if: matrix.os == 'windows-latest' | |
run: | | |
rustup target add i686-pc-windows-msvc | |
cargo build --target=i686-pc-windows-msvc --release | |
- name: Copy files (linux) | |
if: matrix.os == 'ubuntu-latest' | |
run: | | |
cp target/release/*.so examples/ | |
cp bindings/luajit/*.lua examples/ | |
- name: Copy files (windows) | |
if: matrix.os == 'windows-latest' | |
run: | | |
cp target/release/*.dll examples/ | |
cp bindings/luajit/*.lua examples/ | |
- name: Run tests | |
run: | | |
cd examples | |
lua test_server.lua & | |
lua test_clients.lua | |
shell: bash |