Skip to content

rename

rename #26

Workflow file for this run

name: Build
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
# workflow_dispatch: # manual
jobs:
build:
name: Build
runs-on: windows-latest
steps:
# https://github.com/marketplace/actions/checkout
- uses: actions/checkout@v4
with:
submodules: recursive
# I want to retrieve only some files in a submodule and I want to limit the number of recurrences, but how?
# https://github.com/marketplace/actions/enable-developer-command-prompt
- uses: ilammy/msvc-dev-cmd@v1
with:
arch: x86
# https://github.com/marketplace/actions/cache
- name: Cache Lua
uses: actions/cache@v4
id: cache-lua
with:
path: ${{github.workspace}}/src/MWSE/deps/LuaJIT/src
key: lua-${{ hashFiles('.git/modules/src/MWSE/refs/heads/master') }}
# I don't want to have to calculate a hash from a hash file, but how can I key the contents of the file?
- name: Build Lua
if: steps.cache-lua.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/src/MWSE/deps/LuaJIT/src
run: |
./msvcbuild.bat
- name: Cache Effil
uses: actions/cache@v4
id: cache-effil
with:
path: |
src/effil/*.dll
src/effil/*.pdb
src/effil/*.exp
key: effil-${{ hashFiles('.git/modules/src/effil/refs/heads/master') }}
- name: Build Effil
if: steps.cache-effil.outputs.cache-hit != 'true'
working-directory: ${{github.workspace}}/src/effil
run: |
cmake . -A Win32 -DLUA_INCLUDE_DIR="${{github.workspace}}/src/MWSE/deps/LuaJIT/src" -DLUA_LIBRARY="${{github.workspace}}/src/MWSE/deps/LuaJIT/src/lua*.lib"
cmake --build . --target effil --config Release -- -m
- name: Create MWSE Package
shell: cmd
run: |
mkdir effil-mwse
xcopy "MWSE\Data Files\MWSE\lib\" "effil-mwse\Data Files\MWSE\lib\" /s /y /v
copy /v "MWSE\Data Files\efiil-metadata.toml" "effil-mwse\Data Files"
copy /v "src\effil\effil.dll" "effil-mwse\Data Files\MWSE\lib"
copy /v "src\effil\LICENSE" "effil-mwse\effil-LICENSE"
copy /v "LICENSE" "effil-mwse"
copy /v "README.md" "effil-mwse"
- name: Create MWSE Test Package
shell: cmd
run: |
mkdir effil-mwse-test
xcopy "MWSE\Data Files\MWSE\mods\effiltest\" "effil-mwse-test\Data Files\MWSE\mods\effiltest\" /s /y /v
copy /v "MWSE\Data Files\efiiltest-metadata.toml" "effil-mwse-test\Data Files"
- name: Upload effil-mwse
uses: actions/upload-artifact@v4
with:
name: effil-mwse
path: |
effil-mwse
retention-days: 3
- name: Upload effil-mwse-test
uses: actions/upload-artifact@v4
with:
name: effil-mwse-test
path: |
effil-mwse-test
retention-days: 3