File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,15 +24,29 @@ jobs:
2424 cmake . -B build -A x64
2525 cmake --build build --config Release
2626
27- - name : " Read model name (Linux)"
28- run : |
29- echo "MODEL_PATH=$(cat build/model.txt)" >> $GITHUB_ENV
27+ - name: "Read model paths (Linux)"
3028 if: runner.os != 'Windows'
31-
32- - name : " Read model name (Windows)"
3329 run: |
34- echo "MODEL_PATH=$(cat build/model.txt)" | Out-File -FilePath $env:GITHUB_ENV -Append
30+ MODEL_PATHS=""
31+ while IFS= read -r line || [ -n "$line" ]; do
32+ line=$(echo "$line" | tr -d '\r' | xargs)
33+ if [ -z "$line" ]; then
34+ continue
35+ fi
36+ if [ -z "$MODEL_PATHS" ]; then
37+ MODEL_PATHS="$line"
38+ else
39+ MODEL_PATHS="$MODEL_PATHS;$line"
40+ fi
41+ done < build/models.txt
42+ printf 'MODEL_PATHS=%s\n' "$MODEL_PATHS" >> $GITHUB_ENV
43+
44+ - name: "Read model paths (Windows)"
3545 if: runner.os == 'Windows'
46+ run: |
47+ $paths = Get-Content -Path build/models.txt | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne '' }
48+ $joined = $paths -join ';'
49+ "MODEL_PATHS=$joined" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding UTF8
3650
3751 - name: "Archive library"
3852 uses: actions/upload-artifact@v4
4761 name: modelDescription
4862 path: build/${{ env.MODEL_PATH }}/modelDescription.xml
4963
64+
5065 deploy:
5166 needs: build
5267 runs-on: ubuntu-22.04
You can’t perform that action at this time.
0 commit comments