Merge pull request #2 from ChillerDragon/pr_typo #18
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: Build | |
on: | |
push: | |
branches-ignore: | |
- gh-readonly-queue/** | |
pull_request: | |
merge_group: | |
jobs: | |
build-cmake: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [ubuntu-latest] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Prepare Linux | |
if: contains(matrix.os, 'ubuntu') | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install rustc cargo postfix mailutils -y | |
- name: Prepare Linux (mysql & email) | |
if: ${{ contains(matrix.os, 'ubuntu') && !matrix.fancy }} | |
run: | | |
sudo touch /etc/aliases | |
sudo bash -c 'echo "test: root" >> /etc/aliases' | |
sudo bash -c 'echo "test2: root" >> /etc/aliases' | |
sudo postalias /etc/aliases | |
sudo apt-get install libmariadb-dev mariadb-server -y | |
sudo mysql <<EOF | |
CREATE USER 'ddnet-account-test'@localhost IDENTIFIED BY 'test'; | |
CREATE DATABASE ddnet_account_test; | |
GRANT ALL PRIVILEGES ON ddnet_account_test.* TO 'ddnet-account-test'@localhost; | |
FLUSH PRIVILEGES; | |
EOF | |
- name: Cache Rust dependencies | |
uses: Swatinem/rust-cache@v2 | |
- name: Build in debug mode | |
run: | | |
cargo build -p ddnet-account-client | |
cargo build -p ddnet-account-game-server | |
cargo build -p ddnet-accounts-shared | |
cargo build -p ddnet-account-sql | |
cargo build -p ddnet-accounts-types | |
cargo build -p ddnet-account-client-http-fs | |
cargo build -p ddnet-account-client-reqwest | |
cargo build | |
- name: Test debug | |
run: | | |
cargo test -- --test-threads=1 | |
- name: Build in release mode | |
run: | | |
cargo build -p ddnet-account-client --release | |
cargo build -p ddnet-account-game-server --release | |
cargo build -p ddnet-accounts-shared --release | |
cargo build -p ddnet-account-sql --release | |
cargo build -p ddnet-accounts-types --release | |
cargo build -p ddnet-account-client-http-fs --release | |
cargo build -p ddnet-account-client-reqwest --release | |
cargo build --release | |
- name: Test release | |
run: | | |
cargo test --release -- --test-threads=1 |