Think i found the issue but its glitched #48
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: Automatic CipherOS Builder | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
test-and-build: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
arch: [x64, arm64, x32] | |
exclude: | |
- os: windows-latest | |
arch: arm64 | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Setup Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.13' | |
- name: Install Inno Setup | |
if: runner.os == 'Windows' | |
run: | | |
choco install innosetup -y | |
shell: cmd | |
- name: Install Dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install -r requirements.txt pyinstaller | |
- name: Detect Architecture | |
run: echo "Running on $RUNNER_OS with architecture $RUNNER_ARCH" | |
shell: bash | |
- name: Run Compilation Script | |
shell: bash | |
run: | | |
OUTPUT_DIR="distworkflow/${{ matrix.os }}/${{ matrix.arch }}" | |
mkdir -p "$OUTPUT_DIR" | |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
echo "Compiling for Windows (${RUNNER_ARCH})..." | |
pyinstaller main.py --distpath "$OUTPUT_DIR" --onefile --icon="./icon.ico" --name="cipheros" | |
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then | |
echo "Compiling for Linux (${RUNNER_ARCH})..." | |
pyinstaller main.py --distpath "$OUTPUT_DIR" --onefile --icon="./icon.ico" --name="cipheros" | |
chmod +x $OUTPUT_DIR/cipheros | |
elif [[ "${{ matrix.os }}" == "macos-latest" ]]; then | |
echo "Compiling for macOS (${RUNNER_ARCH})..." | |
pyinstaller main.py --distpath "$OUTPUT_DIR" --onefile --icon="./icon.ico" --name="cipheros" | |
chmod +x $OUTPUT_DIR/cipheros | |
fi | |
- name: Test Initialization | |
shell: bash | |
run: | | |
EXECUTABLE="distworkflow/${{ matrix.os }}/${{ matrix.arch }}/cipheros" | |
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then | |
EXECUTABLE="${EXECUTABLE}.exe" | |
fi | |
if [[ ! -f "$EXECUTABLE" ]]; then | |
echo "Error: Compiled executable not found!" | |
exit 1 | |
fi | |
$EXECUTABLE --debug --startdir=. || (echo "Error: Program failed during initialization!" && exit 1) | |
- name: Debug distworkflow Directory | |
run: | | |
echo "Contents of ./distworkflow:" | |
ls -la ./distworkflow | |
shell: bash | |
- name: Debug Current Directory | |
run: | | |
echo "Contents of current directory (./):" | |
ls -la ./ | |
shell: bash | |
- name: Package with Inno Setup | |
if: runner.os == 'Windows' | |
run: | | |
# Detect architecture | |
$arch = if ($env:PROCESSOR_ARCHITECTURE -eq "AMD64") { "x64" } else { "x32" } | |
# Set the path to the ISS file based on architecture | |
$issFile = if ($arch -eq "x64") { "inno\\installer_x64.iss" } else { "inno\\installer_x32.iss" } | |
# Run the Inno Setup Compiler | |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" $issFile | |
shell: pwsh | |
- name: Upload Build Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: "${{ matrix.os }}-${{ matrix.arch }}-build" | |
path: "distworkflow/${{ matrix.os }}/${{ matrix.arch }}" | |