rayjs/.github/workflows/weekly.yml

107 lines
2.8 KiB
YAML
Raw Normal View History

2023-05-23 20:59:58 +00:00
name: Weekly Build
on:
2023-05-23 21:04:05 +00:00
workflow_dispatch:
2023-05-23 20:59:58 +00:00
schedule:
- cron: "0 3 * * 0"
env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
BUILD_TYPE: Release
jobs:
build-linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Install libs
run: |
sudo apt-get update -qq
sudo apt-get install gcc-multilib
sudo apt-get install -y --no-install-recommends libglfw3 libglfw3-dev libx11-dev libxcursor-dev libxrandr-dev libxinerama-dev libxi-dev libxext-dev libxfixes-dev
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
2023-05-24 19:22:42 +00:00
- name: Generate Artifacts
run: |
mkdir release
cp -v ./examples/lib.raylib.d.ts ./release
cp -v ./main.js ./release
2023-05-24 19:29:10 +00:00
cp -v ./rayjs ./release
2023-05-24 19:22:42 +00:00
cp -v ./readme.md ./release
tar -czvf rayjs_linux_x64.tar.gz release
2023-05-23 20:59:58 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: rayjs-linux
2023-05-24 19:44:47 +00:00
path: rayjs_linux_x64.tar.gz
2023-05-23 20:59:58 +00:00
build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure CMake
run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
2023-05-24 19:22:42 +00:00
- name: Generate Artifacts
run: |
mkdir release
cp -v ./examples/lib.raylib.d.ts ./release
cp -v ./main.js ./release
2023-05-24 19:29:10 +00:00
cp -v ./rayjs ./release
2023-05-24 19:22:42 +00:00
cp -v ./readme.md ./release
tar -czvf rayjs_macos_universal.tar.gz release
2023-05-23 20:59:58 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: rayjs-macos
2023-05-24 19:22:42 +00:00
path: rayjs_macos_universal.tar.gz
2023-05-23 20:59:58 +00:00
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Configure CMake
run: cmake -G "MinGW Makefiles" -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
- name: Build
run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}}
2023-05-24 19:22:42 +00:00
- name: Generate Artifacts
run: |
mkdir release
2023-05-25 07:16:13 +00:00
copy /Y examples\lib.raylib.d.ts release\lib.raylib.d.ts
copy /Y main.js release\main.js
copy /Y rayjs.exe release\rayjs.exe
copy /Y readme.md release\readme.md
2023-05-24 19:22:42 +00:00
7z a ./rayjs_windows_x64.zip ./release
dir
shell: cmd
2023-05-23 20:59:58 +00:00
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: rayjs-windows
2023-05-24 19:22:42 +00:00
path: rayjs_windows_x64.zip