Skip to content

Add GUI build steps, update chars and fonts, improve logging and UI i… #107

Add GUI build steps, update chars and fonts, improve logging and UI i…

Add GUI build steps, update chars and fonts, improve logging and UI i… #107

name: Build and Upload
on: [push]
jobs:
build:
strategy:
matrix:
include:
- os: ubuntu-latest
target: x86_64-unknown-linux-musl
dir: musl
- os: windows-latest
target: i686-pc-windows-msvc
dir: windows
- os: macos-latest
target: x86_64-apple-darwin
dir: macos
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install musl-tools (Linux)
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y musl-tools
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
target: ${{ matrix.target }}
- name: Cache cargo registry
uses: actions/cache@v2
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('Cargo.lock') }}
- name: Cache cargo index
uses: actions/cache@v2
with:
path: ~/.cargo/git
key: ${{ runner.os }}-cargo-git-${{ hashFiles('Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v2
with:
path: target
key: ${{ runner.os }}-cargo-build-${{ hashFiles('Cargo.lock') }}
- name: Build client
run: cargo build --locked --release --target ${{ matrix.target }} --manifest-path binaries/geph5-client/Cargo.toml
- name: Move client binaries to artifacts directory
shell: bash
run: |
mkdir -p artifacts/${{ matrix.dir }}
mv target/${{ matrix.target }}/release/geph5-client artifacts/${{ matrix.dir }}/
- name: Build bridge and exit
if: matrix.os == 'ubuntu-latest'
run: |
cargo build --locked --release --target ${{ matrix.target }} --manifest-path binaries/geph5-bridge/Cargo.toml
cargo build --locked --release --target ${{ matrix.target }} --manifest-path binaries/geph5-exit/Cargo.toml
- name: Move client binaries to artifacts directory
if: matrix.os == 'ubuntu-latest'
run: |
mkdir -p artifacts/${{ matrix.dir }}
mv target/${{ matrix.target }}/release/geph5-bridge artifacts/${{ matrix.dir }}/
mv target/${{ matrix.target }}/release/geph5-exit artifacts/${{ matrix.dir }}/
- name: Build client GUI
run: cargo build --locked --release --target ${{ matrix.target }} --manifest-path binaries/geph5-client-gui/Cargo.toml
- name: Move client GUI binaries to artifacts directory
shell: bash
run: |
mkdir -p artifacts/${{ matrix.dir }}
mv target/${{ matrix.target }}/release/geph5-client-gui artifacts/${{ matrix.dir }}/
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.dir }}-latest
path: artifacts/${{ matrix.dir }}
upload:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download all artifacts
uses: actions/download-artifact@v2
with:
path: artifacts
- name: Upload to Cloudflare R2
uses: ryand56/[email protected]
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
r2-bucket: geph5
source-dir: artifacts/musl-latest
# Adjust 'destination-dir' as per need
destination-dir: ./musl-latest
- name: Upload to Cloudflare R2
uses: ryand56/[email protected]
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
r2-bucket: geph5
source-dir: artifacts/macos-latest
# Adjust 'destination-dir' as per need
destination-dir: ./macos-latest
- name: Upload to Cloudflare R2
uses: ryand56/[email protected]
with:
r2-account-id: ${{ secrets.R2_ACCOUNT_ID }}
r2-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
r2-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
r2-bucket: geph5
source-dir: artifacts/windows-latest
# Adjust 'destination-dir' as per need
destination-dir: ./windows-latest