Skip to content

Oops, gave it a file path not a directory #40

Oops, gave it a file path not a directory

Oops, gave it a file path not a directory #40

name: Test Debug Builds
on:
push:
branches: [master, dev]
pull_request:
branches: [master, dev]
jobs:
build:
strategy:
fail-fast: false
matrix:
include:
- name: Ubuntu 64bit (gcc)
os: ubuntu-latest
args: -DCMAKE_BUILD_TYPE=Debug -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-Debug-vNext-Ubuntu-${{ github.run_number }}
artifacts_path: PCem-Debug-${{ github.sha }}.tar.bz2
installdeps: >-
libsdl2-dev
libopenal-dev
libwxgtk3.0-gtk3-dev
libpcap-dev
cmake
ninja-build
- name: Windows 32bits (MSYS2)
os: windows-latest
compiler: MINGW32
args: -DCMAKE_BUILD_TYPE=Debug -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-Debug-vNext-Windows-MINGW32-${{ github.run_number }}
artifacts_path: PCem-Debug-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-i686-ntldd-git
mingw-w64-i686-toolchain
mingw-w64-i686-SDL2
mingw-w64-i686-openal
mingw-w64-i686-wxWidgets
mingw-w64-i686-cmake
mingw-w64-i686-libpcap
mingw-w64-i686-ninja
- name: Windows 64bits (MSYS2)
os: windows-latest
compiler: MINGW64
args: -DCMAKE_BUILD_TYPE=Debug -DPCEM_VERSION_STRING="vNext build ${GITHUB_SHA::8}"
artifacts_name: PCem-Debug-vNext-Windows-MINGW64-${{ github.run_number }}
artifacts_path: PCem-Debug-${{ github.sha }}.zip
installdeps: >-
base-devel
zip
unzip
mingw-w64-x86_64-ntldd-git
mingw-w64-x86_64-toolchain
mingw-w64-x86_64-SDL2
mingw-w64-x86_64-openal
mingw-w64-x86_64-wxWidgets
mingw-w64-x86_64-cmake
mingw-w64-x86_64-libpcap
mingw-w64-x86_64-ninja
runs-on: ${{ matrix.os }}
name: ${{ matrix.name }}
steps:
- uses: actions/checkout@v2
with:
path: temp
fetch-depth: 0
- name: Setup MSYS2 (Windows)
if: runner.os == 'Windows'
# You may pin to the exact commit or the version.
# uses: msys2/setup-msys2@a43b8403533fffe0c157dd8498f021ddec66bff7
uses: msys2/setup-msys2@v2
with:
# Variant of the environment to set by default: MSYS, MINGW32, MINGW64, UCRT64 or CLANG64
msystem: ${{ matrix.compiler }}
# Retrieve and extract base installation from upstream GitHub Releases
release: false # optional, default is true
# Update MSYS2 installation through pacman
update: false
# Install packages after installation through pacman
install: ${{ matrix.installdeps }}
- name: Setup ubuntu dependencies
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install ${{ matrix.installdeps }}
# Copy all the sources to the dist folder, before we start generating intermediate files.
- name: prepare-package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
mkdir temp/build
cd temp/build
cmake -G "Ninja" -DMSYS=TRUE -DCMAKE_INSTALL_PREFIX=$INSTALL_PREFIX ${{ matrix.args }} ..
- name: ninja (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
cd temp/build
ninja
- name: package (Windows)
if: runner.os == 'Windows'
shell: msys2 {0}
run: |
export INSTALL_PREFIX=$(pwd)/dist
cd temp/build
ninja install
cd $INSTALL_PREFIX
ntldd -R "bin/pcem.exe" | sed -e 's/^[[:blank:]]*//g' | cut -d ' ' -f 3 | grep -E -i '(mingw|clang)(32|64)' | sed -e 's|\\|/|g' | xargs cp --target-directory="bin"
zip -r -9 ${{ matrix.artifacts_path }} *
- name: prepare-package (Linux)
if: runner.os == 'Linux'
run: |
mkdir dist
mkdir dist/src
cp -R ./temp/* dist/src
rm -Rf ./dist/src/.git
- name: configure (Linux)
if: runner.os == 'Linux'
run: |
mkdir temp/build
cd temp/build
cmake -G "Ninja" ${{ matrix.args }} ..
- name: ninja (Linux)
if: runner.os == 'Linux'
run: |
cd temp/build
ninja
- name: package (Linux)
if: runner.os == 'Linux'
run: |
export DESTDIR=$(pwd)/dist
cd temp/build
ninja install
cd $DESTDIR
tar -cjf ${{ matrix.artifacts_path }} *
- name: 'Upload GitHub Actions artifacts'
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.artifacts_name }}
path: ./dist/${{ matrix.artifacts_path }}
- name: Upload to NasuTek MinIO S3
uses: shallwefootball/s3-upload-action@master
id: S3
with:
aws_key_id: ${{secrets.nte_cdn_s3_key_id}}
aws_secret_access_key: ${{secrets.nte_cdn_s3_secret_access_key}}
aws_bucket: bucketName
source_dir: ./dist
destination_dir: ${{ matrix.artifacts_name }}
endpoint: cdn.ntgecdn.com