Skip to content

update action

update action #13

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
run: |
copy /v "src\effil\effil.dll" "MWSE\Data Files\MWSE\lib"
copy /v "src\effil\LICENSE" "MWSE\effil-LICENSE"
copy "LICENSE" "MWSE"
copy "README.md" "MWSE"
- name: Upload MWSE
uses: actions/upload-artifact@v4
with:
name: effil-mw
path: |
MWSE/*
retention-days: 1