Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for github action build #7

Merged
merged 4 commits into from
Jul 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Derived from: https://github.com/vlang/vls/blob/use-tree-sitter/.github/workflows/prerelease.yml
name: Build and release pre-release build

on:
workflow_dispatch


jobs:
build-linux-x64:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- name: Install Boehm GC
run: sudo apt-get install libgc-dev
- name: Install gg dependecies
run: sudo apt-get install libxi-dev libxcursor-dev libgl-dev libasound2-dev
- name: Checkout V
uses: actions/checkout@v2
with:
repository: vlang/v
- name: Checkout Kurarin
uses: actions/checkout@v2
with:
path: kurarin
- name: Build local V
run: make && sudo ./v symlink
- name: Compile Kurarin
run: |
cd kurarin
v --version
chmod +x ext/release.sh
ext/release.sh
- name: Create binary only artifact
uses: actions/upload-artifact@v2
with:
name: linux_x64
path: ./kurarin/linux_x64.zip


pre-release:
name: Create Github Release
needs: [build-linux-x64]
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v1
- name: Fetch linux_x64
uses: actions/download-artifact@v1
with:
name: linux_x64
path: ./linux_x64
- uses: "marvinpinto/action-automatic-releases@latest"
name: Create Release and Upload Assets
id: create_release
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: true
title: "Latest Development Build"
files: |
linux_x64/linux_x64.zip
10 changes: 9 additions & 1 deletion ext/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,24 @@ echo "Building Kurarin!"
v -cc clang -gc boehm -d release_unique .
echo "Done building!"

echo "Getting sample map!"
wget https://hatsune-miku.has.rocks/r/hikari.zip
mkdir assets/osu/maps/hikari -p
unzip hikari.zip -d assets/osu/maps/hikari

echo "Getting sample map!"

mkdir build -p
mkdir build/assets -p
mkdir build/assets/osu -p
mkdir build/assets/osu/maps/hikari -p


cp kurarin build/ -r
cp assets/common build/assets/ -r
cp assets/osu/shaders build/assets/osu/shaders -r
cp assets/osu/skins build/assets/osu/skins -r
cp "assets/osu/maps/Hikari no Naka e" build/assets/osu/maps -r
cp "assets/osu/maps/hikari" build/assets/osu/maps -r

cd build
zip -r ../linux_x64.zip .
Expand Down
Loading