Code deobfuscation/decyphering (3) #629
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- synchronize | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
static-analysis: | |
name: Static analysis | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install | |
run: | | |
sudo apt update | |
sudo apt install cppcheck | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: cppcheck | |
run: cppcheck --std=c++17 src/ | |
code-format: | |
name: Code format check | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: clang-format | |
run: find src -type f -name \*.cc -o -name \*.h | xargs clang-format --dry-run --Werror | |
android: | |
name: Android | |
runs-on: ubuntu-latest | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Setup Java | |
uses: actions/setup-java@v3 | |
with: | |
distribution: temurin | |
java-version: 11 | |
cache: gradle | |
- name: Cache cmake build | |
uses: actions/cache@v4 | |
with: | |
path: os/android/app/.cxx | |
key: android-cmake-v2 | |
- name: Setup signing config | |
if: env.KEYSTORE_FILE_BASE64 != '' && env.KEYSTORE_PROPERTIES_FILE_BASE64 != '' | |
run: | | |
cd os/android | |
echo "$KEYSTORE_FILE_BASE64" | base64 --decode > debug.keystore | |
echo "$KEYSTORE_PROPERTIES_FILE_BASE64" | base64 --decode > debug-keystore.properties | |
env: | |
KEYSTORE_FILE_BASE64: ${{ secrets.ANDROID_DEBUG_KEYSTORE_FILE_BASE64 }} | |
KEYSTORE_PROPERTIES_FILE_BASE64: ${{ secrets.ANDROID_DEBUG_KEYSTORE_PROPERTIES_FILE_BASE64 }} | |
- name: Build | |
run: | | |
cd os/android | |
./gradlew assembleDebug | |
- name: Prepare artifacts | |
run: | | |
mkdir artifacts/ | |
cp os/android/app/build/outputs/apk/debug/app-debug.apk artifacts/fallout2-ce-debug.apk | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-fallout2-ce-debug.apk | |
path: artifacts/* | |
retention-days: 7 | |
ios: | |
name: iOS | |
runs-on: macos-14 | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Cache cmake build | |
uses: actions/cache@v4 | |
with: | |
path: build | |
key: ios-cmake-v4 | |
- name: Configure | |
run: | | |
cmake \ | |
-B build \ | |
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \ | |
-D ENABLE_BITCODE=0 \ | |
-D PLATFORM=OS64 \ | |
-G Xcode \ | |
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \ | |
# EOL | |
- name: Build | |
run: | | |
cmake \ | |
--build build \ | |
--config RelWithDebInfo \ | |
-j $(sysctl -n hw.physicalcpu) \ | |
# EOL | |
- name: Pack | |
run: | | |
mkdir artifacts/ | |
cd build | |
cpack -C RelWithDebInfo | |
cd ../ | |
cp build/fallout2-ce.ipa artifacts/fallout2-ce.ipa | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-fallout2-ce.ipa | |
path: artifacts/* | |
retention-days: 7 | |
linux: | |
name: Linux (${{ matrix.arch }}) | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
arch: | |
- x86 | |
- x64 | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Dependencies (x86) | |
if: matrix.arch == 'x86' | |
run: | | |
sudo dpkg --add-architecture i386 | |
sudo apt update | |
sudo apt install --allow-downgrades libpcre2-8-0=10.34-7 | |
sudo apt install g++-multilib libsdl2-dev:i386 zlib1g-dev:i386 | |
- name: Dependencies (x64) | |
if: matrix.arch == 'x64' | |
run: | | |
sudo apt update | |
sudo apt install libsdl2-dev zlib1g-dev | |
- name: Cache cmake build | |
uses: actions/cache@v4 | |
with: | |
path: build | |
key: linux-${{ matrix.arch }}-cmake-v3 | |
- name: Configure (x86) | |
if: matrix.arch == 'x86' | |
run: | | |
cmake \ | |
-B build \ | |
-D CMAKE_BUILD_TYPE=RelWithDebInfo \ | |
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/Linux32.cmake \ | |
# EOL | |
- name: Configure (x64) | |
if: matrix.arch == 'x64' | |
run: | | |
cmake \ | |
-B build \ | |
-D CMAKE_BUILD_TYPE=RelWithDebInfo \ | |
# EOL | |
- name: Build | |
run: | | |
cmake \ | |
--build build \ | |
-j $(nproc) \ | |
# EOL | |
- name: Prepare artifacts | |
run: | | |
mkdir artifacts/ | |
cp build/fallout2-ce artifacts/fallout2-ce-linux-${{ matrix.arch }} | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-fallout2-ce-linux-${{ matrix.arch }} | |
path: artifacts/* | |
retention-days: 7 | |
macos: | |
name: macOS | |
runs-on: macos-14 | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Cache cmake build | |
uses: actions/cache@v4 | |
with: | |
path: build | |
key: macos-cmake-v6 | |
- name: Configure | |
run: | | |
cmake \ | |
-B build \ | |
-G Xcode \ | |
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \ | |
# EOL | |
- name: Build | |
run: | | |
cmake \ | |
--build build \ | |
--config RelWithDebInfo \ | |
-j $(sysctl -n hw.physicalcpu) \ | |
# EOL | |
- name: Pack | |
run: | | |
mkdir artifacts/ | |
cd build | |
cpack -C RelWithDebInfo | |
cd ../ | |
cp "build/Fallout II Community Edition.dmg" "artifacts/Fallout II Community Edition.dmg" | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-fallout2-ce-macos.dmg | |
path: artifacts/* | |
retention-days: 7 | |
windows: | |
name: Windows (${{ matrix.arch }}) | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- arch: x86 | |
generator-platform: Win32 | |
- arch: x64 | |
generator-platform: x64 | |
steps: | |
- name: Clone | |
uses: actions/checkout@v4 | |
- name: Cache cmake build | |
uses: actions/cache@v4 | |
with: | |
path: build | |
key: windows-${{ matrix.arch }}-cmake-v2 | |
- name: Configure | |
run: | | |
cmake \ | |
-B build \ | |
-G "Visual Studio 16 2019" \ | |
-A ${{ matrix.generator-platform }} \ | |
# EOL | |
- name: Build | |
run: | | |
cmake \ | |
--build build \ | |
--config RelWithDebInfo \ | |
# EOL | |
- name: Prepare artifacts | |
run: | | |
mkdir artifacts/ | |
cp build/RelWithDebInfo/fallout2-ce.exe artifacts/fallout2-ce-windows-${{ matrix.arch }}.exe | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
with: | |
name: artifact-fallout2-ce-windows-${{ matrix.arch }} | |
path: artifacts/* | |
retention-days: 7 | |
release: | |
name: Release Continuous build | |
runs-on: ubuntu-latest | |
needs: [android, ios, linux, macos, windows] | |
permissions: write-all | |
steps: | |
- name: Fetch artifacts | |
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }} | |
uses: actions/[email protected] | |
with: | |
path: artifacts/ | |
- name: Remove old release | |
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }} | |
uses: dev-drprasad/[email protected] | |
with: | |
delete_release: true | |
tag_name: continious | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Repackage binaries and allow GitHub to process removed release for few seconds | |
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }} | |
continue-on-error: true | |
run: | | |
cd artifacts/ | |
for i in artifact-*; do | |
mv "$i"/* . | |
rm -rf "$i" | |
done | |
ls -R . | |
cd ../ | |
sleep 20s | |
- name: Upload new release | |
if: ${{ always() && github.ref == 'refs/heads/main' && github.event_name == 'push' }} | |
uses: softprops/[email protected] | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
files: artifacts/* | |
tag_name: continious | |
draft: false | |
prerelease: true | |
name: Fallout2-CE Continuous Build |