Build #65
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: [ stable ] | |
workflow_dispatch: | |
env: | |
CARGO_TERM_COLOR: always | |
HYPERSPEEDCUBE_VERSION: 2.0.0-pre.12 | |
HSC_OFFICIAL_BUILD: 1 | |
jobs: | |
windows: | |
name: Build Windows latest | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- name: Build Hyperspeedcube | |
run: cargo build --release | |
- name: Assemble release | |
run: | | |
mkdir release | |
move target/release/hyperspeedcube.exe release | |
move lua release/lua | |
- name: Upload release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_win64 | |
path: release/* | |
linux: | |
name: Build Linux latest | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- name: Update apt | |
run: sudo apt update | |
- name: Install egui dependencies | |
run: sudo apt install libxcb-render0-dev libxcb-shape0-dev libxcb-xfixes0-dev libspeechd-dev libxkbcommon-dev libssl-dev | |
- name: Install Rusty File Dialog dependencies | |
run: sudo apt install libgtk-3-dev | |
- name: Install XKB/XCB dev dependencies | |
run: sudo apt install libxkbcommon-dev libxkbcommon-x11-dev libxcb1-dev libxcb-xinput-dev | |
- name: Build Hyperspeedcube | |
run: cargo build --release | |
- name: Make tarball | |
run: tar -czf hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_linux.tar.gz lua -C target/release hyperspeedcube | |
- name: Upload release | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_linux | |
path: hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_linux.tar.gz | |
macos: | |
name: Build macOS latest | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo | |
- uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: stable | |
components: clippy | |
override: true | |
- name: Install cargo-bundle | |
uses: actions-rs/[email protected] | |
with: | |
crate: cargo-bundle | |
version: latest | |
use-tool-cache: true | |
- name: Build Hyperspeedcube | |
run: cargo build --release | |
- name: Make app | |
run: cd hyperspeedcube && cargo bundle --release | |
- name: Make tarball | |
run: tar -czf hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_macos.tar.gz -C target/release/bundle/osx Hyperspeedcube.app | |
- name: Upload app | |
uses: actions/upload-artifact@v4 | |
with: | |
name: hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_macos | |
path: hyperspeedcube_v${{ env.HYPERSPEEDCUBE_VERSION }}_macos.tar.gz |