Skip to content

Merge pull request #2 from NathanSnail/error_nulls #204

Merge pull request #2 from NathanSnail/error_nulls

Merge pull request #2 from NathanSnail/error_nulls #204

Workflow file for this run

on: push
permissions:
contents: write
jobs:
build:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build LuaJIT
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.22000.0 -vcvars_ver=14
curl -O https://luajit.org/download/LuaJIT-2.0.4.zip
powershell -nologo -command "Expand-Archive LuaJIT-2.0.4.zip"
cd LuaJIT-2.0.4\LuaJIT-2.0.4\src
msvcbuild.bat
# There's vcpkg at C:/vcpkg/vcpkg, but that one has the wrong hashes for
# boost, so we can't use it right now.
- name: Install latest vcpkg
run: |
git clone --depth 1 https://github.com/microsoft/vcpkg C:\vcpkg2
C:\vcpkg2\bootstrap-vcpkg.bat
- name: Get build dependencies
run: |
C:/vcpkg2/vcpkg install boost-system:x86-windows-static
C:/vcpkg2/vcpkg install boost-asio:x86-windows-static
- name: Install documentation dependencies
run: |
py -3.11 -m venv venv
./venv/Scripts/activate.ps1
python -m pip install -r doc_requirements.txt
- name: build
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.22000.0 -vcvars_ver=14
call ".\venv\Scripts\activate.bat"
mkdir build
cmake -S . -B build -G "Ninja" ^
-DCMAKE_TOOLCHAIN_FILE=C:/vcpkg2/scripts/buildsystems/vcpkg.cmake ^
-DVCPKG_TARGET_TRIPLET=x86-windows-static ^
-DCMAKE_CXX_FLAGS="/D_WIN32_WINNT=0x0601 /DWINVER=0x0601 /DWIN32 /D_WINDOWS /EHsc /MD" ^
-DLua_ROOT=%CD%\LuaJIT-2.0.4\LuaJIT-2.0.4\src ^
-DNOITAPATCHER_DOCS=ON ^
-DCMAKE_BUILD_TYPE=Release
cmake --build build --verbose
- name: Run CPack
shell: cmd
run: |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" x86 10.0.22000.0 -vcvars_ver=14
cd build
cpack
- name: Upload build zip
uses: actions/upload-artifact@v3
with:
name: package
path: build/*.zip
retention-days: 2
- name: Upload docs
uses: actions/upload-artifact@v3
with:
name: docs
path: build/Documentation/_build/
retention-days: 2
- name: Create release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/release-')
with:
files: |
build/*.zip
upload-docs:
needs: [build]
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/release-')
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Download Artifacts
uses: actions/download-artifact@v1
with:
name: docs
- name: nojekyll
run: touch docs/.nojekyll
- name: Update site
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: 'docs'