chore(ci): always upload build logs for CPN runs (#6682)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user