Update dos-djgpp.yml

This commit is contained in:
WitherOrNot 2023-08-10 16:59:23 -04:00 committed by GitHub
parent f43a2d5c37
commit bde4371cbe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,74 +21,64 @@
name: C/C++ CI (DOS DJGPP) name: C/C++ CI (DOS DJGPP)
on: on:
push: workflow_call:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
env: env:
CMAKE_C_COMPILER: ${{ github.workspace }}/djgpp/bin/i386-pc-msdosdjgpp-gcc CC: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-gcc
CMAKE_CXX_COMPILER: ${{ github.workspace }}/djgpp/bin/i386-pc-msdosdjgpp-g++ CXX: ${{ github.workspace }}/djgpp/bin/i586-pc-msdosdjgpp-g++
CMAKE_FIND_ROOT_PATH: ${{ github.workspace }}/djgpp CMAKE_FIND_ROOT_PATH: ${{ github.workspace }}/djgpp
CMAKE_FIND_ROOT_PATH_MODE_PROGRAM: NEVER
CMAKE_FIND_ROOT_PATH_MODE_LIBRARY: ONLY
CMAKE_FIND_ROOT_PATH_MODE_INCLUDE: ONLY
CMAKE_FIND_ROOT_PATH_MODE_PACKAGE: ONLY
WATT_ROOT: ${{ github.workspace }}/djgpp/watt32 WATT_ROOT: ${{ github.workspace }}/djgpp/watt32
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout Source Tree
uses: actions/checkout@v3
- name: Setup build environment - name: Setup build environment
run: | run: |
sudo apt -y update sudo apt -y update
sudo apt -y install build-essential cmake wget 7zip git flex nasm libslang2-dev pkg-config libslang2-modules gcc-multilib sudo apt -y install build-essential cmake wget 7zip git flex libfl-dev nasm libslang2-dev pkg-config libslang2-modules gcc-multilib
- name: Download and Setup DJGPP Toolchain - name: Download and Setup DJGPP Toolchain
run: | run: |
mkdir ${{ github.workspace }}/djgpp pushd ${{ github.workspace }}
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 cd ${{ github.workspace }}/djgpp
wget https://github.com/UMSKT/build-djgpp/releases/download/toolchain/toolchain.tar.gz
tar xzf toolchain.tar.gz
git clone https://github.com/UMSKT/Watt-32.git watt32 git clone https://github.com/UMSKT/Watt-32.git watt32
cd watt32/util cd watt32/util
make clean && make linux make clean && make linux
cd ../src cd ../src
source ${{ github.workspace }}/djgpp/setenv
./configur.sh djgpp ./configur.sh djgpp
make -f djgpp.mak make -f djgpp.mak
ln -s ${{ github.workspace }}/djgpp/watt32/lib/libwatt.a ${{ github.workspace }}/djgpp/lib ln -s ${WATT_ROOT}/lib/libwatt.a ${{ github.workspace }}/djgpp/lib
- name: Checkout and Cross Compile OpenSSL 3.1 - name: Checkout and Cross Compile OpenSSL 3.1.2
run: | run: |
git clone https://github.com/UMSKT/openssl.git openssl git clone https://github.com/UMSKT/openssl.git openssl
pushd openssl pushd openssl
git checkout openssl-3.1.1
source ${{ github.workspace }}/djgpp/setenv source ${{ github.workspace }}/djgpp/setenv
./Configure no-threads -DOPENSSL_DEV_NO_ATOMICS --prefix=${{ github.workspace }}/djgpp DJGPP ./Configure no-threads -DOPENSSL_DEV_NO_ATOMICS --prefix=${{ github.workspace }}/djgpp DJGPP
make && make install make && make install
popd popd
ls ${{ github.workspace }}/djgpp/i386-pc-msdosdjgpp/bin/
- name: Checkout Source Tree
uses: actions/checkout@v3
- name: Build - name: Build
uses: threeal/cmake-action@v1.2.0
with:
c-compiler: gcc
cxx-compiler: g++
options: OPENSSL_ROOT_DIR:string=${{ github.workspace }}/djgpp DJGPP_WATT32=ON
run-build: true
- name: Test & Move files to correct directory
run: | run: |
mkdir -p build/actions_upload source ${{ github.workspace }}/djgpp/setenv
mv build/umskt build/actions_upload/umskt pushd build
cmake ../ -D DJGPP_WATT32=${WATT_ROOT}/lib/libwatt.a -D CMAKE_FIND_ROOT_PATH=${CMAKE_FIND_ROOT_PATH}
make
- name: Move executable to upload directory
run: |
mkdir build/actions_upload
mv build/umskt.exe build/actions_upload/
- name: Upload build artifact - name: Upload build artifact
uses: actions/upload-artifact@v3.1.2 uses: actions/upload-artifact@v3.1.2
with: with:
name: UMSKT-DOS-DJGPP name: UMSKT-DOS
path: build/actions_upload path: build/actions_upload