| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
name: Test And Pack (Docker) |
| 14 |
|
| 15 |
|
| 16 |
on: [workflow_call] |
| 17 |
|
| 18 |
|
| 19 |
defaults: |
| 20 |
run: |
| 21 |
shell: bash |
| 22 |
|
| 23 |
jobs: |
| 24 |
test-docker-base: |
| 25 |
strategy: |
| 26 |
matrix: |
| 27 |
fpc-name: [stable, fpc320, fpc331] |
| 28 |
include: |
| 29 |
- fpc-name: stable |
| 30 |
docker-tag: cge-none |
| 31 |
- fpc-name: fpc320 |
| 32 |
docker-tag: cge-none-fpc320 |
| 33 |
- fpc-name: fpc331 |
| 34 |
docker-tag: cge-none-fpc331 |
| 35 |
name: Base Tests |
| 36 |
runs-on: ubuntu-latest |
| 37 |
|
| 38 |
|
| 39 |
container: kambi/castle-engine-cloud-builds-tools:${{ matrix.docker-tag }} |
| 40 |
steps: |
| 41 |
- uses: actions/checkout@v4 |
| 42 |
|
| 43 |
|
| 44 |
|
| 45 |
- name: Set environment |
| 46 |
run: echo "CASTLE_ENGINE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 47 |
- name: Build Tools |
| 48 |
run: make clean default |
| 49 |
- name: Build And Run Auto-Tests |
| 50 |
run: make clean tests |
| 51 |
|
| 52 |
|
| 53 |
- name: Build Using FpMake |
| 54 |
if: ${{ matrix.fpc-name != 'fpc331' }} |
| 55 |
run: make clean test-fpmake |
| 56 |
- name: Test CastleWindow backends |
| 57 |
run: ./tools/internal/check_castle_window_backends_compilation |
| 58 |
- name: Test build tool --output |
| 59 |
run: ./tools/internal/check_build_tool_output |
| 60 |
- name: Test LPG (Lazarus Package Group) |
| 61 |
run: ./tools/internal/check_lpg_compilation |
| 62 |
|
| 63 |
test-docker-examples: |
| 64 |
strategy: |
| 65 |
matrix: |
| 66 |
fpc-name: [stable, fpc320, fpc331] |
| 67 |
include: |
| 68 |
- fpc-name: stable |
| 69 |
docker-tag: cge-none |
| 70 |
- fpc-name: fpc320 |
| 71 |
docker-tag: cge-none-fpc320 |
| 72 |
- fpc-name: fpc331 |
| 73 |
docker-tag: cge-none-fpc331 |
| 74 |
name: Examples |
| 75 |
runs-on: ubuntu-latest |
| 76 |
container: kambi/castle-engine-cloud-builds-tools:cge-none |
| 77 |
steps: |
| 78 |
- uses: actions/checkout@v4 |
| 79 |
- name: Set environment |
| 80 |
run: echo "CASTLE_ENGINE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 81 |
- name: Build Examples |
| 82 |
run: make clean examples CASTLE_CONSERVE_DISK_SPACE=true |
| 83 |
|
| 84 |
test-docker-examples-laz: |
| 85 |
strategy: |
| 86 |
matrix: |
| 87 |
fpc-name: [stable, fpc320, fpc331] |
| 88 |
include: |
| 89 |
- fpc-name: stable |
| 90 |
docker-tag: cge-none |
| 91 |
- fpc-name: fpc320 |
| 92 |
docker-tag: cge-none-fpc320 |
| 93 |
- fpc-name: fpc331 |
| 94 |
docker-tag: cge-none-fpc331 |
| 95 |
name: Examples Using Lazarus |
| 96 |
runs-on: ubuntu-latest |
| 97 |
container: kambi/castle-engine-cloud-builds-tools:cge-none |
| 98 |
steps: |
| 99 |
- uses: actions/checkout@v4 |
| 100 |
- name: Set environment |
| 101 |
run: echo "CASTLE_ENGINE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
- name: Avoid GIT dubious ownership errors |
| 114 |
run: git config --global --add safe.directory /__w/castle-engine/castle-engine |
| 115 |
|
| 116 |
- name: Build Examples Using Lazarus (FPC / Lazarus Stable) |
| 117 |
run: make clean examples-laz CASTLE_CONSERVE_DISK_SPACE=true |
| 118 |
|
| 119 |
|
| 120 |
pack_1: |
| 121 |
name: Pack to zip (1) |
| 122 |
runs-on: ubuntu-latest |
| 123 |
container: kambi/castle-engine-cloud-builds-tools:cge-none |
| 124 |
steps: |
| 125 |
- uses: actions/checkout@v4 |
| 126 |
- name: Set environment |
| 127 |
run: echo "CASTLE_ENGINE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 128 |
- name: Remove previous artifacts |
| 129 |
run: rm -f castle-engine*.zip |
| 130 |
|
| 131 |
- name: Pack Win64/x86_64 |
| 132 |
run: ./tools/internal/pack_release/pack_release.sh win64 x86_64 |
| 133 |
- name: Pack Win32/i386 |
| 134 |
run: ./tools/internal/pack_release/pack_release.sh win32 i386 |
| 135 |
- name: Pack Linux/x86_64 |
| 136 |
run: ./tools/internal/pack_release/pack_release.sh linux x86_64 |
| 137 |
|
| 138 |
- name: Archive Artifacts |
| 139 |
uses: actions/upload-artifact@v4 |
| 140 |
with: |
| 141 |
name: windows-and-linux-release-from-docker-1 |
| 142 |
path: "castle-engine*.zip" |
| 143 |
if-no-files-found: error |
| 144 |
|
| 145 |
|
| 146 |
|
| 147 |
pack_2: |
| 148 |
name: Pack to zip (2) |
| 149 |
runs-on: ubuntu-latest |
| 150 |
container: kambi/castle-engine-cloud-builds-tools:cge-none |
| 151 |
steps: |
| 152 |
- uses: actions/checkout@v4 |
| 153 |
- name: Set environment |
| 154 |
run: echo "CASTLE_ENGINE_PATH=$GITHUB_WORKSPACE" >> $GITHUB_ENV |
| 155 |
|
| 156 |
- name: Download bundled FPC |
| 157 |
uses: robinraju/[email protected] |
| 158 |
with: |
| 159 |
repository: "castle-engine/cge-fpc" |
| 160 |
latest: true |
| 161 |
|
| 162 |
fileName: "*" |
| 163 |
- name: Pack With Bundled FPC for Win64/x86_64 |
| 164 |
run: CGE_PACK_BUNDLE=yes ./tools/internal/pack_release/pack_release.sh win64 x86_64 |
| 165 |
- name: Pack With Bundled FPC for Linux/x86_64 |
| 166 |
run: CGE_PACK_BUNDLE=yes ./tools/internal/pack_release/pack_release.sh linux x86_64 |
| 167 |
|
| 168 |
- name: Archive Artifacts |
| 169 |
uses: actions/upload-artifact@v4 |
| 170 |
with: |
| 171 |
name: windows-and-linux-release-from-docker-2 |
| 172 |
path: "castle-engine*.zip" |
| 173 |
if-no-files-found: error |