chore(ci): always upload build logs for CPN runs (#6682)

This commit is contained in:
Peter Feerick
2025-10-20 13:02:42 +10:00
committed by GitHub
parent ee0f70ec87
commit f194260070
4 changed files with 91 additions and 7 deletions
+26 -2
View File
@@ -46,16 +46,40 @@ jobs:
working-directory: ${{github.workspace}}
shell: bash
run: |
mkdir output && \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
mkdir output && mkdir logs && \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/" 2>&1 | tee logs/build-main.log
- name: Collect build logs
if: always()
shell: bash
run: |
# Create logs directory if it doesn't exist
mkdir -p logs
# Copy all build logs from the build directory
if [ -d "build" ]; then
find build -name "*.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
find build -name "CMakeOutput.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
find build -name "CMakeError.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
fi
- name: Compose release filename
if: always()
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
run: echo "artifact_name=edgetx-cpn-linux-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Archive production artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: ${{github.workspace}}/output
retention-days: 15
- name: Archive build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}-logs"
path: ${{github.workspace}}/logs
retention-days: 30
+26 -2
View File
@@ -74,16 +74,40 @@ jobs:
working-directory: ${{github.workspace}}
shell: bash
run: |
mkdir output && \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
mkdir output && mkdir logs && \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/" 2>&1 | tee logs/build-main.log
- name: Collect build logs
if: always()
shell: bash
run: |
# Create logs directory if it doesn't exist
mkdir -p logs
# Copy all build logs from the build directory
if [ -d "build" ]; then
find build -name "*.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
find build -name "CMakeOutput.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
find build -name "CMakeError.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
fi
- name: Compose release filename
if: always()
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
run: echo "artifact_name=edgetx-cpn-osx-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Archive production artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: ${{github.workspace}}/output
retention-days: 15
- name: Archive build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}-logs"
path: ${{github.workspace}}/logs
retention-days: 30
+26 -2
View File
@@ -75,17 +75,41 @@ jobs:
- name: Build
run: |
mkdir output && \
mkdir output && mkdir logs && \
CMAKE_PREFIX_PATH="$QT_ROOT_DIR;$SDL2_ROOT" \
tools/build-companion.sh "$(pwd)" "$(pwd)/output/"
tools/build-companion.sh "$(pwd)" "$(pwd)/output/" 2>&1 | tee logs/build-main.log
- name: Collect build logs
if: always()
shell: bash
run: |
# Create logs directory if it doesn't exist
mkdir -p logs
# Copy all build logs from the build directory
if [ -d "build" ]; then
find build -name "*.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
find build -name "CMakeOutput.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
find build -name "CMakeError.log" -type f -exec cp {} logs/ \; 2>/dev/null || true
fi
- name: Compose release filename
if: always()
# https://stackoverflow.com/questions/58033366/how-to-get-current-branch-within-github-actions
run: echo "artifact_name=edgetx-cpn-win64-${GITHUB_REF##*/}" >> $GITHUB_ENV
- name: Archive production artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}"
path: ${{github.workspace}}/output
retention-days: 15
- name: Archive build logs
if: always()
uses: actions/upload-artifact@v4
with:
name: "${{ env.artifact_name }}-logs"
path: ${{github.workspace}}/logs
retention-days: 30