Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
  • Loading branch information
Grégoire Henry committed Dec 13, 2023
1 parent 52ed765 commit 3a36361
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Build and upload release

on:
push:
branches:
- '**'

jobs:
release-ubuntu:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Cache Rust dependencies
uses: actions/cache@v3
with:
path: target
key: ${{ runner.OS }}-build-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.OS }}-build-
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install SDL2
run: sudo apt install -y libsdl2-dev

- name: Set environment variables
run: ./compile/ubuntu/set_env.sh

- name: Build kalast
run: ./compile/generic/build_kalast.sh

- name: Make bundle
run: ./compile/generic/make_bundle.sh

- name: Release
uses: softprops/action-gh-release@v1
with:
files: kalast-${{ github.ref_name }}-ubuntu.tar.gz
prerelease: true
6 changes: 2 additions & 4 deletions compile/generic/build_kalast.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@
echo $PLATFORM

echo "Build main executable."
# cargo build -r --all-features --example viewer-picker && strip target/release/examples/viewer-picker
cargo build -r && strip target/release/kalast
cargo build -r --all-features && strip target/release/kalast

echo "Build custom executable for specific examples."
# cargo build -r --all-features --example viewer-picker && strip target/release/examples/viewer-picker
cargo build -r --example viewer-picker && strip target/release/examples/viewer-picker
cargo build -r --all-features --example viewer-picker && strip target/release/examples/viewer-picker

0 comments on commit 3a36361

Please sign in to comment.