2023-07-09 06:08:43 +03:00
|
|
|
# This file is a part of the UMSKT Project
|
|
|
|
#
|
2024-01-05 02:32:18 +02:00
|
|
|
# Copyleft (C) 2019-2024 UMSKT Contributors (et.al.)
|
2023-07-09 06:08:43 +03:00
|
|
|
#
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
#
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU Affero General Public License for more details.
|
|
|
|
#
|
|
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
|
|
|
# @FileCreated by Neo on 06/19/2023
|
|
|
|
# @Maintainer Neo
|
|
|
|
|
|
|
|
name: C/C++ CI (DOS DJGPP)
|
|
|
|
|
2023-07-25 09:53:42 +03:00
|
|
|
on:
|
|
|
|
push:
|
2023-08-14 22:09:41 +03:00
|
|
|
branches: [ "*" ]
|
2023-08-15 04:59:25 +03:00
|
|
|
paths-ignore: [ '**.md', 'doc/**', '.idea/**'] # If only these files are edited, skip
|
2023-08-14 22:09:41 +03:00
|
|
|
workflow_dispatch:
|
2023-07-09 06:08:43 +03:00
|
|
|
|
|
|
|
env:
|
2023-08-10 23:59:23 +03:00
|
|
|
CC: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
|
|
|
|
CXX: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-g++
|
2023-07-09 06:08:43 +03:00
|
|
|
CMAKE_FIND_ROOT_PATH: ${{ github.workspace }}/djgpp
|
|
|
|
WATT_ROOT: ${{ github.workspace }}/djgpp/watt32
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-08-10 23:59:23 +03:00
|
|
|
- name: Checkout Source Tree
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
2023-07-09 06:08:43 +03:00
|
|
|
- name: Setup build environment
|
|
|
|
run: |
|
|
|
|
sudo apt -y update
|
2023-08-10 23:59:23 +03:00
|
|
|
sudo apt -y install build-essential cmake wget 7zip git flex libfl-dev nasm libslang2-dev pkg-config libslang2-modules gcc-multilib
|
2023-07-09 06:08:43 +03:00
|
|
|
|
|
|
|
- name: Download and Setup DJGPP Toolchain
|
|
|
|
run: |
|
2023-08-10 23:59:23 +03:00
|
|
|
pushd ${{ github.workspace }}
|
2023-07-09 06:08:43 +03:00
|
|
|
wget https://github.com/andrewwutw/build-djgpp/releases/download/v3.4/djgpp-linux64-gcc1220.tar.bz2
|
|
|
|
tar xjf djgpp-linux64-gcc1220.tar.bz2
|
|
|
|
cd ${{ github.workspace }}/djgpp
|
|
|
|
git clone https://github.com/UMSKT/Watt-32.git watt32
|
|
|
|
cd watt32/util
|
|
|
|
make clean && make linux
|
|
|
|
cd ../src
|
2023-08-10 23:59:23 +03:00
|
|
|
source ${{ github.workspace }}/djgpp/setenv
|
2023-07-09 06:08:43 +03:00
|
|
|
./configur.sh djgpp
|
|
|
|
make -f djgpp.mak
|
2024-02-17 18:07:37 +02:00
|
|
|
ln -s ${WATT_ROOT}/lib/libwatt.a ${CMAKE_FIND_ROOT_PATH}/lib
|
2023-07-09 06:08:43 +03:00
|
|
|
|
|
|
|
- name: Build
|
2023-08-10 23:59:23 +03:00
|
|
|
run: |
|
|
|
|
source ${{ github.workspace }}/djgpp/setenv
|
2024-02-17 18:07:37 +02:00
|
|
|
cmake -DDJGPP_WATT32=${WATT_ROOT}/lib/libwatt.a -DCMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH} -DCMAKE_BUILD_TYPE=Release build/
|
|
|
|
cmake --build build/
|
2023-07-09 06:08:43 +03:00
|
|
|
|
2023-08-10 23:59:23 +03:00
|
|
|
- name: Move executable to upload directory
|
2023-07-09 06:08:43 +03:00
|
|
|
run: |
|
2023-08-10 23:59:23 +03:00
|
|
|
mkdir build/actions_upload
|
|
|
|
mv build/umskt.exe build/actions_upload/
|
2023-07-09 06:08:43 +03:00
|
|
|
|
|
|
|
- name: Upload build artifact
|
|
|
|
uses: actions/upload-artifact@v3.1.2
|
|
|
|
with:
|
2023-08-10 23:59:23 +03:00
|
|
|
name: UMSKT-DOS
|
2023-07-09 06:08:43 +03:00
|
|
|
path: build/actions_upload
|