Repository navigation
139 lines (136 loc) · 5.89 KB
/
Copy pathbinary.yml
File metadata and controls
139 lines (136 loc) · 5.89 KB
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: Standalone binary acceptance
on:
workflow_call:
inputs:
version:
type: string
required: true
release:
type: boolean
default: false
permissions:
contents: read
jobs:
binary:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
platform: linux
arch: X64
- os: ubuntu-24.04-arm
platform: linux
arch: ARM64
- os: windows-2022
platform: windows
arch: X64
suffix: .exe
- os: macos-15
platform: macos
arch: ARM64
- os: macos-15-intel
platform: macos
arch: X64
runs-on: ${{ matrix.os }}
timeout-minutes: 35
env:
RELEASE_VERSION: ${{ inputs.version }}
ARTIFACT_NAME: alphagsm-${{ inputs.version }}-${{ matrix.platform }}-${{ matrix.arch }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: requirements*.txt
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: "21"
- name: Install pinned build dependencies
run: python -m pip install -r requirements-build.txt pytest==9.0.2 pytest-timeout==2.4.0
- name: Verify platform process supervision and update transactions
env:
PYTHONPATH: .:src
shell: bash
run: |
if [ "$RUNNER_OS" = Windows ]; then export PYTHONPATH='.;src'; fi
python -m pytest -q -o timeout=60 tests/unit_tests/screen/test_managed_subprocess.py \
tests/unit_tests/screen/test_windows_job.py tests/unit_tests/core/test_binary_update.py \
tests/unit_tests/core/test_frozen_dispatch.py \
tests/unit_tests/server/test_platform_support.py tests/unit_tests/server/test_container_platform.py \
tests/unit_tests/utils/test_asset_import.py tests/unit_tests/server/test_assets.py \
tests/unit_tests/utils/test_reclaimer.py tests/unit_tests/gamemodules/test_projectreclaimer.py \
tests/unit_tests/test_reclaimer_lifecycle.py \
tests/unit_tests/downloader/test_database_paths.py tests/unit_tests/server/test_process_logs.py \
tests/unit_tests/screen/test_managed_legacy.py \
tests/unit_tests/screen/test_supervisor_cleanup.py \
tests/unit_tests/utils/test_settings.py::test_settings_use_utf8_independently_of_windows_default_codepage
- name: Prepare Windows release signing identity
if: inputs.release && runner.os == 'Windows'
env:
ALPHAGSM_SIGN_PFX: ${{ secrets.ALPHAGSM_WINDOWS_SIGN_PFX }}
ALPHAGSM_SIGN_PASSWORD: ${{ secrets.ALPHAGSM_WINDOWS_SIGN_PASSWORD }}
run: python scripts/sign_release.py prepare
- name: Prepare macOS release signing identity
if: inputs.release && runner.os == 'macOS'
env:
ALPHAGSM_SIGN_PFX: ${{ secrets.ALPHAGSM_MACOS_SIGN_PFX }}
ALPHAGSM_SIGN_PASSWORD: ${{ secrets.ALPHAGSM_MACOS_SIGN_PASSWORD }}
ALPHAGSM_CODESIGN_IDENTITY: ${{ secrets.ALPHAGSM_CODESIGN_IDENTITY }}
run: python scripts/sign_release.py prepare
- name: Build release executable
shell: bash
run: >-
python scripts/build_binary.py --version "$RELEASE_VERSION"
--release-dir release-artifacts --artifact-name "$ARTIFACT_NAME"
- name: Sign and notarize release executable
if: inputs.release && runner.os != 'Linux'
env:
ALPHAGSM_SIGN_PASSWORD: ${{ secrets.ALPHAGSM_WINDOWS_SIGN_PASSWORD }}
ALPHAGSM_APPLE_ID: ${{ secrets.ALPHAGSM_APPLE_ID }}
ALPHAGSM_APPLE_TEAM_ID: ${{ secrets.ALPHAGSM_APPLE_TEAM_ID }}
ALPHAGSM_APPLE_PASSWORD: ${{ secrets.ALPHAGSM_APPLE_PASSWORD }}
run: python scripts/sign_release.py sign
- uses: actions/cache@v4
with:
path: binary-fixtures/server.jar
key: minecraft-binary-fixture-64bb6d763bed0a9f1d632ec347938594144943ed
- name: Download verified acceptance fixture
run: python scripts/fetch_binary_fixture.py binary-fixtures/server.jar
- name: Test isolated executable and full process lifecycle
shell: bash
run: >-
python scripts/verify_binary.py
"release-artifacts/$ARTIFACT_NAME${{ matrix.suffix }}"
--expected-version "$RELEASE_VERSION"
--minecraft-jar binary-fixtures/server.jar
--backend subprocess --work-dir binary-evidence
- name: Test executable with branch-built Docker runtime
if: matrix.os == 'ubuntu-22.04'
shell: bash
run: |
docker build -t alphagsm-java:binary-ci -f docker/java/Dockerfile .
python scripts/verify_binary.py "release-artifacts/$ARTIFACT_NAME" \
--expected-version "$RELEASE_VERSION" --minecraft-jar binary-fixtures/server.jar \
--runtime docker --image alphagsm-java:binary-ci --work-dir binary-docker-evidence
- name: Capture dependency inventory
shell: bash
run: python -m pip freeze > "release-artifacts/$ARTIFACT_NAME.dependencies.txt"
- uses: actions/upload-artifact@v4
with:
name: ${{ inputs.release && 'release' || 'binary' }}-${{ matrix.platform }}-${{ matrix.arch }}
path: release-artifacts/*
if-no-files-found: error
- name: Retain acceptance diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: binary-evidence-${{ inputs.release && 'release' || 'ci' }}-${{ matrix.platform }}-${{ matrix.arch }}
path: |
binary-evidence/evidence/
binary-docker-evidence/evidence/
- name: Remove temporary signing material
if: always() && inputs.release && runner.os != 'Linux'
run: python scripts/sign_release.py cleanup