summaryrefslogtreecommitdiffstats
path: root/.github/workflows/reLCS_msvc_x86.yml
blob: d34e47d532d2d97ec887738a1dc74ad2ea67fd76 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
name: reLCS premake x86

on:
  pull_request:
  push:
  release:
    types: published
env:
  GLFW_VER: "3.3.2"
  GLFW_BASE: "glfw-3.3.2.bin.WIN32"
  GLFW_FILE: "glfw-3.3.2.bin.WIN32.zip"
  GLFW_URL: "https://github.com/glfw/glfw/releases/download/3.3.2/glfw-3.3.2.bin.WIN32.zip"
jobs:
  build:
    runs-on: windows-2019
    strategy:
      matrix:
        platform: [win-x86-librw_d3d9-mss, win-x86-librw_gl3_glfw-mss, win-x86-librw_d3d9-oal, win-x86-librw_gl3_glfw-oal]
        buildtype: [Debug, Release]
    steps:
    - name: Add msbuild to PATH
      uses: microsoft/setup-msbuild@v1.0.2
    - uses: actions/checkout@v2
      with:
        submodules: 'true'
    - if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
      name: Download glfw
      uses: carlosperate/download-file-action@v1.0.3
      with:
        file-url: ${{env.GLFW_URL}}
    - if: ${{ matrix.platform }} == "win-x86-librw_gl3_glfw-mss"
      name: Unpack archives
      run: |
          7z x ${{env.GLFW_FILE}}
    - name: Configure build
      run: |
        ./premake5 vs2019 --with-librw --glfwdir32=${{env.GLFW_BASE}}
    - name: Build
      run: |
        msbuild -m build/reLCS.sln /property:Configuration=${{matrix.buildtype}} /property:Platform=${{matrix.platform}}
    # - name: Pack artifacts
      # run: |
        # 7z a reLCS_${{matrix.buildtype}}_${{matrix.platform}}.zip ./bin/${{matrix.platform}}/${{matrix.buildtype}}/*
    - name: Move binaries to gamefiles
      run: |
        mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reLCS.exe ./gamefiles/
        mv ./bin/${{matrix.platform}}/${{matrix.buildtype}}/reLCS.pdb ./gamefiles/
    - if: contains(matrix.platform, 'oal')
      name: Move dynamic dependencies to gamefiles
      run: |
        mv ./vendor/mpg123/dist/Win32/libmpg123-0.dll ./gamefiles/
        mv ./vendor/openal-soft/dist/Win32/OpenAL32.dll ./gamefiles/
    - name: Upload artifact to actions
      uses: actions/upload-artifact@v2
      with:
        name: reLCS_${{matrix.buildtype}}_${{matrix.platform}}
        path: ./gamefiles/*
#    - name: Upload artifact to Bintray
#      uses: hpcsc/upload-bintray-docker-action@v1
#      with:
#        repository: reLCS
#        package: ${{matrix.buildtype}}_${{matrix.platform}}
#        version:  1.0-$(echo ${GITHUB_SHA}
#        sourcePath: ./bin/${{matrix.platform}}/${{matrix.buildtype}}
#        username: gtamodding
#        apiKey: ${{secrets.BINTRAY_API_KEY}}