Repository navigation
170 lines (149 loc) · 6.36 KB
/
Copy pathcross-platform.yml
File metadata and controls
170 lines (149 loc) · 6.36 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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
name: Cross-platform Desktop
on:
push:
branches:
- master
paths:
- "mySQLPunk.Core/**"
- "mySQLPunk.Desktop/**"
- "mySQLPunk.CrossPlatform.SmokeTests/**"
- "tests/Run-CrossPlatformLiveTests.sh"
- "tests/Run-PostgreSqlVersionMigration.py"
- "tests/PostgreSqlVersionMigrationHarness/**"
- "tests/Run-MySqlLogicalMigration.py"
- "tests/MySqlLogicalMigrationHarness/**"
- "tests/Run-DesktopProfileOperationTests.sh"
- "tests/DesktopProfileOperationHarness/**"
- "tests/Test-LinuxCrossPlatformPackage.sh"
- "tests/Test-LinuxUpdateApply.sh"
- "tests/Test-MacCrossPlatformPackage.sh"
- "scripts/package-cross-platform.sh"
- "packaging/**"
- "mySQLPunk.CrossPlatform.sln"
- ".github/workflows/cross-platform.yml"
pull_request:
paths:
- "mySQLPunk.Core/**"
- "mySQLPunk.Desktop/**"
- "mySQLPunk.CrossPlatform.SmokeTests/**"
- "tests/Run-CrossPlatformLiveTests.sh"
- "tests/Run-PostgreSqlVersionMigration.py"
- "tests/PostgreSqlVersionMigrationHarness/**"
- "tests/Run-MySqlLogicalMigration.py"
- "tests/MySqlLogicalMigrationHarness/**"
- "tests/Run-DesktopProfileOperationTests.sh"
- "tests/DesktopProfileOperationHarness/**"
- "tests/Test-LinuxCrossPlatformPackage.sh"
- "tests/Test-LinuxUpdateApply.sh"
- "tests/Test-MacCrossPlatformPackage.sh"
- "scripts/package-cross-platform.sh"
- "packaging/**"
- "mySQLPunk.CrossPlatform.sln"
- ".github/workflows/cross-platform.yml"
workflow_dispatch:
permissions:
contents: read
jobs:
build-and-test:
name: ${{ matrix.name }}
strategy:
fail-fast: false
matrix:
include:
- name: Linux x64
os: ubuntu-24.04
runtimes: linux-x64
artifact_name: linux-x64
live_tests: true
- name: Linux ARM64
os: ubuntu-24.04-arm
runtimes: linux-arm64
artifact_name: linux-arm64
- name: macOS Intel
os: macos-15-intel
runtimes: osx-x64
artifact_name: macos-x64
- name: macOS Apple Silicon
os: macos-15
runtimes: osx-arm64
artifact_name: macos-arm64
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Setup .NET 8
uses: actions/setup-dotnet@v6
with:
dotnet-version: "8.0.x"
- name: Restore
run: dotnet restore mySQLPunk.CrossPlatform.sln
- name: Build
run: dotnet build mySQLPunk.CrossPlatform.sln -c Release --no-restore
- name: Run cross-platform smoke tests
run: dotnet run --project mySQLPunk.CrossPlatform.SmokeTests/mySQLPunk.CrossPlatform.SmokeTests.csproj -c Release --no-build
- name: Build formal PostgreSQL version fixture
run: dotnet build tests/PostgreSqlVersionMigrationHarness/Review.csproj -c Release
- name: Build formal MySQL logical migration fixture
run: dotnet build tests/MySqlLogicalMigrationHarness/Review.csproj -c Release
- name: Run isolated Avalonia profile operation handlers
if: matrix.name == 'Linux x64'
run: ./tests/Run-DesktopProfileOperationTests.sh
- name: Run MySQL, MariaDB, PostgreSQL and SQL Server live round-trip
if: matrix.live_tests == true
run: ./tests/Run-CrossPlatformLiveTests.sh
- name: Run isolated MySQL 8.4 and MariaDB 11.4 bidirectional logical migration
if: matrix.live_tests == true
run: |
docker pull mysql:8.4
docker pull mariadb:11.4
docker pull postgres:16-alpine
python3 tests/Run-MySqlLogicalMigration.py "$RUNNER_TEMP/mysqlpunk-logical-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT"
- name: Verify packet limits and actual owned process termination
if: matrix.live_tests == true
run: python3 tests/Run-MySqlLogicalMigration.py "$RUNNER_TEMP/mysqlpunk-logical-boundaries-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT" boundaries
- name: Verify MySQL 8.0 to 8.4 and MariaDB 10.11 to 11.4 both directions
if: matrix.live_tests == true
run: |
docker pull mysql:8.0
docker pull mariadb:10.11
python3 tests/Run-MySqlLogicalMigration.py "$RUNNER_TEMP/mysqlpunk-logical-versions-$GITHUB_RUN_ID-$GITHUB_RUN_ATTEMPT" versions
- name: Preserve synthetic logical migration evidence
if: always() && matrix.live_tests == true
uses: actions/upload-artifact@v4
with:
name: mysql-logical-migration-evidence
path: ${{ runner.temp }}/mysqlpunk-logical*-${{ github.run_id }}-${{ github.run_attempt }}/
if-no-files-found: ignore
- name: Build self-contained installable archives
run: |
package_version=$(sed -n 's/.*AssemblyFileVersion("\([0-9.]*\)").*/\1/p' mySQLPunk/Properties/AssemblyInfo.cs | tail -n 1)
if [[ ! "$package_version" =~ ^[0-9]+\.[0-9]+\.[0-9]+(\.[0-9]+)?$ ]]; then
echo "Cannot resolve package version from AssemblyInfo.cs: $package_version" >&2
exit 1
fi
for runtime in ${{ matrix.runtimes }}; do
./scripts/package-cross-platform.sh \
--version "$package_version" \
--runtime "$runtime" \
--output dist/cross-platform
done
- name: Smoke test Linux install, startup and uninstall
if: runner.os == 'Linux'
env:
MYSQLPUNK_PACKAGE_RUN_UI: "1"
run: ./tests/Test-LinuxCrossPlatformPackage.sh dist/cross-platform/*-${{ matrix.runtimes }}.tar.gz
- name: Smoke test Linux safe update apply and rollback
if: runner.os == 'Linux'
run: ./tests/Test-LinuxUpdateApply.sh dist/cross-platform/*-${{ matrix.runtimes }}.tar.gz
- name: Verify macOS app archives and safe update apply
if: runner.os == 'macOS'
run: |
./tests/Test-MacCrossPlatformPackage.sh dist/cross-platform/*.app.zip
./tests/Test-MacUpdateApply.sh dist/cross-platform/*-${{ matrix.runtimes }}.app.zip
- name: Upload installable preview packages
uses: actions/upload-artifact@v7
with:
name: mySQLPunk-cross-platform-${{ matrix.artifact_name }}-${{ github.sha }}
path: dist/cross-platform/*
compression-level: 0
retention-days: 14