Fix sign puddles #37
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
name: Server build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
override: true | |
- name: Cache cargo registry | |
uses: actions/cache@v3 | |
with: | |
path: ~/.cargo/registry | |
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-registry- | |
- name: Cache cargo build | |
uses: actions/cache@v3 | |
with: | |
path: target | |
key: ${{ runner.os }}-cargo-build-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: | | |
${{ runner.os }}-cargo-build- | |
- name: Build | |
run: cargo build --release | |
- name: Run tests | |
run: cargo test | |
- name: Prepare artifact files | |
run: | | |
mkdir -p artifacts | |
find ./target/release -name waygate-server -exec cp {} artifacts/ \; | |
find ./target/release -name waygate-generate-keys -exec cp {} artifacts/ \; | |
find ./target/release -name waygate-server.exe -exec cp {} artifacts/ \; | |
find ./target/release -name waygate-generate-keys.exe -exec cp {} artifacts/ \; | |
find ./target/release -name libsteam_api.so -exec cp {} artifacts/ \; | |
find ./target/release -name steam_api64.dll -exec cp {} artifacts/ \; | |
cp announcements.toml artifacts/ | |
cp logging.toml artifacts/ | |
cp steam_appid.txt artifacts/ | |
shell: bash | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: waygate-server-${{ matrix.os }} | |
path: artifacts/ |