| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
name: Delphi Test |
| 7 |
|
| 8 |
|
| 9 |
on: [workflow_call] |
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
|
| 18 |
defaults: |
| 19 |
run: |
| 20 |
shell: bash |
| 21 |
|
| 22 |
jobs: |
| 23 |
delphi_test: |
| 24 |
name: Delphi Test (Job) |
| 25 |
strategy: |
| 26 |
matrix: |
| 27 |
host-label: [ |
| 28 |
delphi_10_2, |
| 29 |
delphi_12_1 |
| 30 |
] |
| 31 |
|
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
runs-on: ${{ matrix.host-label }} |
| 36 |
|
| 37 |
steps: |
| 38 |
- uses: actions/checkout@v4 |
| 39 |
|
| 40 |
|
| 41 |
|
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
|
| 46 |
|
| 47 |
|
| 48 |
|
| 49 |
|
| 50 |
|
| 51 |
|
| 52 |
|
| 53 |
|
| 54 |
|
| 55 |
|
| 56 |
- name: Fix bash multi-line scripts in this job |
| 57 |
run: echo "SHELLOPTS=igncr" >> $GITHUB_ENV |
| 58 |
|
| 59 |
|
| 60 |
|
| 61 |
|
| 62 |
- name: Info |
| 63 |
run: | |
| 64 |
fpc -iV |
| 65 |
lazbuild --version |
| 66 |
make --version |
| 67 |
sed --version |
| 68 |
cygpath --version |
| 69 |
|
| 70 |
- name: Set environment - CASTLE_ENGINE_PATH |
| 71 |
run: echo "CASTLE_ENGINE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 72 |
|
| 73 |
|
| 74 |
|
| 75 |
|
| 76 |
- name: Build Build Tool |
| 77 |
run: | |
| 78 |
rm -Rf installed/ |
| 79 |
mkdir -p installed/bin/ |
| 80 |
tools/build-tool/castle-engine_compile.sh |
| 81 |
cp tools/build-tool/castle-engine.exe installed/bin/ |
| 82 |
|
| 83 |
- name: Set environment - BUILD_TOOL |
| 84 |
run: echo "BUILD_TOOL=`cygpath --mixed \"${CASTLE_ENGINE_PATH}\"/installed/bin/castle-engine.exe`" >> $GITHUB_ENV |
| 85 |
- name: Check Old Delphi-Specific AutoTests (Win64) |
| 86 |
run: | |
| 87 |
cd 'tests/delphi_tests/' |
| 88 |
${BUILD_TOOL} clean |
| 89 |
${BUILD_TOOL} compile --compiler=delphi --os=win64 --cpu=x86_64 |
| 90 |
${BUILD_TOOL} run |
| 91 |
- name: Check Old Delphi-Specific AutoTests (Win32) |
| 92 |
run: | |
| 93 |
cd 'tests/delphi_tests/' |
| 94 |
${BUILD_TOOL} clean |
| 95 |
${BUILD_TOOL} compile --compiler=delphi --os=win32 --cpu=i386 |
| 96 |
${BUILD_TOOL} run |
| 97 |
- name: Check AutoTests (Win64) |
| 98 |
run: | |
| 99 |
cd tests/ |
| 100 |
${BUILD_TOOL} clean |
| 101 |
${BUILD_TOOL} compile --compiler=delphi --os=win64 --cpu=x86_64 |
| 102 |
${BUILD_TOOL} run -- --console --no-window-create |
| 103 |
- name: Check AutoTests (Win32) |
| 104 |
run: | |
| 105 |
cd tests/ |
| 106 |
${BUILD_TOOL} clean |
| 107 |
${BUILD_TOOL} compile --compiler=delphi --os=win32 --cpu=i386 |
| 108 |
${BUILD_TOOL} run -- --console --no-window-create |
| 109 |
- name: Build Templates (Win64) |
| 110 |
run: make test-editor-templates CASTLE_ENGINE_TOOL_OPTIONS="--compiler=delphi --os=win64 --cpu=x86_64" BUILD_TOOL="${BUILD_TOOL}" |
| 111 |
- name: Build Templates (Win32) |
| 112 |
run: make test-editor-templates CASTLE_ENGINE_TOOL_OPTIONS="--compiler=delphi --os=win32 --cpu=i386" BUILD_TOOL="${BUILD_TOOL}" |
| 113 |
|
| 114 |
|
| 115 |
|
| 116 |
|
| 117 |
|
| 118 |
|
| 119 |
|
| 120 |
|
| 121 |
|
| 122 |
- name: Build Examples (Win64) |
| 123 |
if: ${{ matrix.host-label != 'delphi_10_2' }} |
| 124 |
run: make examples-delphi CASTLE_ENGINE_TOOL_OPTIONS="--os=win64 --cpu=x86_64" BUILD_TOOL="${BUILD_TOOL}" |
| 125 |
- name: Build Examples (Win32) |
| 126 |
if: ${{ matrix.host-label != 'delphi_10_2' }} |
| 127 |
run: make examples-delphi CASTLE_ENGINE_TOOL_OPTIONS="--os=win32 --cpu=i386" BUILD_TOOL="${BUILD_TOOL}" |
| 128 |
|
| 129 |
- name: Build Delphi-specific Examples (Win64) |
| 130 |
run: | |
| 131 |
cd examples/delphi/vcl |
| 132 |
${BUILD_TOOL} clean |
| 133 |
${BUILD_TOOL} compile --compiler=delphi --os=win64 --cpu=x86_64 |
| 134 |
cd ../../.. |
| 135 |
cd examples/delphi/fmx |
| 136 |
${BUILD_TOOL} clean |
| 137 |
${BUILD_TOOL} compile --compiler=delphi --os=win64 --cpu=x86_64 |
| 138 |
cd ../../.. |
| 139 |
- name: Build Delphi-specific Examples (Win32) |
| 140 |
run: | |
| 141 |
cd examples/delphi/vcl |
| 142 |
${BUILD_TOOL} clean |
| 143 |
${BUILD_TOOL} compile --compiler=delphi --os=win32 --cpu=i386 |
| 144 |
cd ../../.. |
| 145 |
cd examples/delphi/fmx |
| 146 |
${BUILD_TOOL} clean |
| 147 |
${BUILD_TOOL} compile --compiler=delphi --os=win32 --cpu=i386 |
| 148 |
cd ../../.. |