Skip to content

Commit

Permalink
github actions updates (#601)
Browse files Browse the repository at this point in the history
  • Loading branch information
Die4Ever committed Mar 6, 2024
1 parent c4196a8 commit bbcf16e
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 174 deletions.
159 changes: 6 additions & 153 deletions .github/run-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,178 +10,31 @@ runs:
- run: pip3 install -r installer/requirements.txt 2>&1
shell: bash

# download launchers
- run: mkdir installer/3rdParty
shell: bash
# https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/tree/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/Alternative%20EXEs
- run: >-
curl -Lo installer/3rdParty/KentieDeusExe.exe
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/Alternative%20EXEs/Kentie's%20DeusExe.exe"
shell: bash
- run: >-
curl -Lo installer/3rdParty/DeusExe.u
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/DeusExe.u"
shell: bash
- run: >-
curl -Lo installer/3rdParty/Launch.exe
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/Alternative%20EXEs/Launch.exe"
shell: bash
# download D3D9
- run: >-
curl -Lo installer/3rdParty/D3D9Drv.dll
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/D3D9Drv.dll"
shell: bash
#- run: >-
# curl -Lo installer/3rdParty/D3D9Drv.hut
# "https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/D3D9Drv.hut"
# shell: bash
#- run: >-
# curl -Lo installer/3rdParty/D3D9Drv.int
# "https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/D3D9Drv.int"
# shell: bash

# download and extract OpenGL 2.0 https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/tree/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/CommunityUpdateFileArchiveDXPC/OpenGL
- run: >-
curl -Lo dxglr21.zip
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/CommunityUpdateFileArchiveDXPC/OpenGL/dxglr21.zip"
shell: bash
- run: unzip dxglr21.zip
shell: bash
- run: cp OpenGLDrv.dll installer/3rdParty/OpenGLDrv.dll
shell: bash

# download D3D10 stuff
- run: mkdir installer/3rdParty/d3d10drv
shell: bash

- run: >-
curl -Lo installer/3rdParty/D3D10Drv.int
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/D3D10Drv.int"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv.dll
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv.dll"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/common.fxh
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/common.fxh"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/complexsurface.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/complexsurface.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/finalpass.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/finalpass.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/firstpass.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/firstpass.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/fogsurface.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/fogsurface.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/gouraudpolygon.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/gouraudpolygon.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/hdr.original.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/hdr%20(original).fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/hdr.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/hdr.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/polyflags.fxh
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/polyflags.fxh"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/postprocessing.fxh
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/postprocessing.fxh"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/states.fxh
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/states.fxh"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/tile.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/tile.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/unreal_pom.fx
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/unreal_pom.fx"
shell: bash
- run: >-
curl -Lo installer/3rdParty/d3d10drv/unrealpool.fxh
"https://github.com/Defaultplayer001/Deus-Ex-Universe-Community-Update-/raw/a662f6ed177dba52ad3a0d8141fa2ac72f8af034/%5B1.0%5D%20Deus%20Ex%20-%20Windows-Linux-macOS-Android/DXCU%20Installer%20Source/Mods/Community%20Update/System/d3d10drv/unrealpool.fxh"
shell: bash
# LDDP minimal install
- run: >-
curl -Lo installer/3rdParty/FemJC.u
"https://github.com/LayDDentonProject/Lay-D-Denton-Project/releases/download/v1.1/FemJC.u"
shell: bash
# download DXVK 32bit, the extracted folder has the version number in it like dxvk-2.3
- run: >-
curl -Lo dxvk.tar.gz
"https://github.com/doitsujin/dxvk/releases/download/v2.3/dxvk-2.3.tar.gz"
shell: bash
- run: tar -xf dxvk.tar.gz
shell: bash
- run: mkdir installer/3rdParty/dxvk/
shell: bash
- run: cp dxvk-*/x32/* installer/3rdParty/dxvk/
shell: bash

# check syntax and run tests
- run: python3 -m compileall -q . 2>&1
shell: bash
- run: python3 installer/tests.py 2>&1
shell: bash

- name: Build
run: pyinstaller --clean installer/installer.spec
run: python3 installer/build.py
shell: bash
- run: du -ha dist
shell: bash

- run: cat build/installer/warn-installer.txt
- run: cat installer/build/installer/warn-installer.txt
shell: bash

# small test, use timeouts because on windows the GUI can catch errors and a dialog box will freeze the program
- run: timeout 30 ./dist/DXRandoInstaller --version --verbose 2>&1
- run: timeout 30 ./installer/dist/DXRandoInstaller --version --verbose 2>&1
shell: bash
- run: timeout 30 ./dist/BingoViewer --version 2>&1
- run: timeout 30 ./installer/dist/BingoViewer --version 2>&1
shell: bash

# zip it up
# - if: runner.os == 'Windows'
# run: Compress-Archive -Path ./* -Destination DXRando.zip
# working-directory: ./dist/DXRando/
# shell: pwsh
# - if: runner.os == 'Windows'
# run: Compress-Archive -Path ./* -Destination BingoViewer.zip
# working-directory: ./dist/BingoViewer/
# shell: pwsh
# - if: runner.os != 'Windows'
# run: zip -r9 DXRando.zip .
# working-directory: ./dist/DXRando
# shell: bash
# - if: runner.os != 'Windows'
# run: zip -r9 BingoViewer.zip .
# working-directory: ./dist/BingoViewer
# shell: bash

# make sure we got everything
- run: find installer/3rdParty/
shell: bash
- run: find dist/
- run: find installer/dist/
shell: bash
- run: ls -lah dist/
- run: ls -lah installer/dist/
shell: bash
28 changes: 14 additions & 14 deletions .github/workflows/commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,27 +8,27 @@ jobs:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: ./.github/run-tests

- name: Upload Installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: DXRando
path: dist/DXRandoInstaller.exe
path: installer/dist/DXRandoInstaller.exe

- name: Upload installer warnings
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: installerwarnings.txt
path: build/installer/warn-installer.txt
path: installer/build/installer/warn-installer.txt

- name: Upload Bingo Viewer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: BingoViewer
path: dist/BingoViewer.exe
path: installer/dist/BingoViewer.exe

linux:
runs-on: ubuntu-latest
Expand All @@ -37,27 +37,27 @@ jobs:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- run: sudo apt-get update -y
- run: sudo apt-get install -y python3-tk idle3 binutils

- uses: ./.github/run-tests

- name: Upload Installer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: DXRando-linux
path: dist/DXRandoInstaller
path: installer/dist/DXRandoInstaller

- name: Upload installer warnings
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: installerwarningslinux.txt
path: build/installer/warn-installer.txt
path: installer/build/installer/warn-installer.txt

- name: Upload Bingo Viewer
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: BingoViewer-linux
path: dist/BingoViewer
path: installer/dist/BingoViewer
12 changes: 6 additions & 6 deletions .github/workflows/release-installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: windows-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- uses: ./.github/run-tests

Expand All @@ -18,7 +18,7 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/DXRandoInstaller.exe
file: installer/dist/DXRandoInstaller.exe
asset_name: DXRandoInstaller.exe
tag: ${{ github.ref }}

Expand All @@ -27,7 +27,7 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/BingoViewer.exe
file: installer/dist/BingoViewer.exe
asset_name: BingoViewer.exe
tag: ${{ github.ref }}

Expand All @@ -38,7 +38,7 @@ jobs:
shell: bash
steps:
- name: Check out repository code
uses: actions/checkout@v3
uses: actions/checkout@v4

- run: sudo apt-get update -y
- run: sudo apt-get install -y python3-tk idle3 binutils
Expand All @@ -50,7 +50,7 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/DXRandoInstaller
file: installer/dist/DXRandoInstaller
asset_name: DXRandoInstaller-Linux
tag: ${{ github.ref }}

Expand All @@ -59,6 +59,6 @@ jobs:
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/BingoViewer
file: installer/dist/BingoViewer
asset_name: BingoViewer-Linux
tag: ${{ github.ref }}
2 changes: 1 addition & 1 deletion installer/Install/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ def MD5(bytes:bytes) -> str:
return ret


def DownloadFile(url, dest, callback):
def DownloadFile(url, dest, callback=None):
# still do this on dryrun because it writes to temp?
sslcontext = ssl.create_default_context(cafile=certifi.where())
old_func = ssl._create_default_https_context
Expand Down
Loading

0 comments on commit bbcf16e

Please sign in to comment.