75 lines
2.1 KiB
YAML
75 lines
2.1 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
workflow_dispatch: {}
|
|
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install build tools
|
|
run: |
|
|
# echo "deb [signed-by=/usr/share/keyrings/ubuntu-archive-keyring.gpg] http://archive.ubuntu.com/ubuntu noble main" | sudo tee /tmp/only.list
|
|
# sudo apt-get update -o Dir::Etc::sourcelist=/tmp/only.list -o Dir::Etc::sourceparts="-" -qq
|
|
sudo apt update
|
|
sudo apt install -y build-essential cmake zip unzip make libxrandr-dev g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 libxinerama-dev libxcursor-dev libxi-dev libgl-dev
|
|
|
|
- name: Build makeheaders
|
|
run: |
|
|
cd makeheaders
|
|
make
|
|
cd ..
|
|
|
|
- name: Fetch libraries
|
|
run: |
|
|
cd ${{ gitea.workspace }}/src/libraries
|
|
rm enet -r
|
|
rm Lua -r
|
|
rm raylib -r
|
|
rm yaml-cpp -r
|
|
|
|
wget https://github.com/lsalzman/enet/archive/refs/heads/master.zip
|
|
unzip master.zip
|
|
mv enet-master enet
|
|
rm master.zip
|
|
|
|
wget https://github.com/walterschell/Lua/archive/refs/heads/master.zip
|
|
unzip master.zip
|
|
mv Lua-master Lua
|
|
rm master.zip
|
|
|
|
wget https://github.com/raysan5/raylib/archive/refs/heads/master.zip
|
|
unzip master.zip
|
|
mv raylib-master raylib
|
|
rm master.zip
|
|
|
|
wget https://github.com/jbeder/yaml-cpp/archive/refs/heads/master.zip
|
|
unzip master.zip
|
|
mv yaml-cpp-master yaml-cpp
|
|
rm master.zip
|
|
|
|
ls -r
|
|
|
|
cd ../..
|
|
|
|
|
|
- name: Compile
|
|
run: |
|
|
chmod +x ${{ gitea.workspace }}/compile.sh
|
|
sh ${{ gitea.workspace }}/compile.sh
|
|
zip -r release-linux.zip OUTPUT-Linux || true
|
|
zip -r release-w64.zip OUTPUT-w64 || true
|
|
|
|
- name: Upload artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: build-artifacts
|
|
path: |
|
|
release-linux.zip
|
|
release-w64.zip
|