Skip to content

Commit

Permalink
debug config
Browse files Browse the repository at this point in the history
  • Loading branch information
non-det-alle committed Mar 21, 2024
1 parent f73a486 commit 9fe38eb
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 29 deletions.
42 changes: 33 additions & 9 deletions .github/actions/build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ name: "build"
description: "Defines the central steps in building ns-3"

inputs:
test:
description: "Whether to run tests"
default: "false"
save-ccache:
description: "Whether to update build ccache after building"
default: "true"
Expand Down Expand Up @@ -30,15 +33,36 @@ runs:
- name: "Build ns-3"
shell: bash
run: ./ns3 build
# Post-build steps
- if: inputs.store-artifacts == 'true'
name: "Tar files to preserve permissions"
# Manage inter-run placeholder for running tests
- name: "Get cache miss rate"
shell: bash
run: |
echo "CACHE_MISS=`./utils/ccache-miss-rate.py`" >> $GITHUB_ENV
touch build/tests-base.txt
- if: env.CACHE_MISS != '0'
name: "Create tests placeholder"
shell: bash
run: tar -cf build.tzst --exclude build.tzst -P -C $GITHUB_WORKSPACE --use-compress-program zstdmt build/ .lock-*
- if: inputs.store-artifacts == 'true'
name: "Upload build artifacts"
run: |
touch build/tests-$BUILD_ID.txt
- if: env.CACHE_MISS != '0'
name: "Upload tests placeholder"
uses: actions/upload-artifact@v4
with:
name: ${{ env.BUILD_ID }}
path: build.tzst
retention-days: 2
name: ${{ format('{0}{1}', 'tests-', env.BUILD_ID) }}
path: build/tests-*.txt
retention-days: 90
# Post-build steps
#- if: inputs.store-artifacts == 'true'
# name: "Tar files to preserve permissions"
# shell: bash
# run: tar -cf build.tzst --exclude build.tzst -P -C $GITHUB_WORKSPACE --use-compress-program zstdmt build/ .lock-*
#- if: inputs.store-artifacts == 'true'
# name: "Upload build artifacts"
# uses: actions/upload-artifact@v4
# with:
# name: ${{ env.BUILD_ID }}
# path: build.tzst
# retention-days: 2
- name: "Show ccache stats"
shell: bash
run: ccache -s
26 changes: 20 additions & 6 deletions .github/actions/test/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,25 @@ description: "Defines the central steps in testing ns-3"
runs:
using: "composite"
steps:
# Test steps
- name: "Store ccache miss rate"
- name: "Download tests placeholder"
shell: bash
run: echo "CACHE_MISS=`./utils/ccache-miss-rate.py`" >> $GITHUB_ENV
- if: env.CACHE_MISS != '0' && env.MODE != 'debug'
name: "Test ns-3"
uses: actions/download-artifact@v4
with:
name: ${{ format('{0}{1}', 'tests-', env.BUILD_ID) }}
path: build
# Test steps
- name: "Test ns-3"
shell: bash
run: ./test.py -n
run: >
if [[ "$MODE" != "debug" ]] && [[ -f build/tests-$BUILD_ID.txt ]];
then ./test.py -n;
if [[ $? == 0 ]];
then `rm build/tests-$BUILD_ID.txt` || true;
fi;
fi
- name: "Upload tests placeholder"
uses: actions/upload-artifact@v4
with:
name: ${{ format('{0}{1}', 'tests-', env.BUILD_ID) }}
path: build/tests-*.txt
retention-days: 90
28 changes: 14 additions & 14 deletions .github/workflows/per-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@ run-name: "per-commit"

on:
push:
branches: [develop]
branches: [develop, fix-ns-3.41-ci]
pull_request:
branches: [develop]
workflow_dispatch:

jobs:
code-formatting:
uses: ./.github/workflows/.formatting.yml
#code-formatting:
# uses: ./.github/workflows/.formatting.yml

compile:
needs: code-formatting
#needs: code-formatting
runs-on: ubuntu-latest
container:
image: archlinux
Expand Down Expand Up @@ -54,20 +54,20 @@ jobs:

code-linting:
needs: compile
uses: ./.github/workflows/.linting.yml

documentation:
needs: code-linting
# uses: ./.github/workflows/.linting.yml
#
#documentation:
# needs: code-linting
uses: ./.github/workflows/.test-doc.yml

code-analysis:
needs: documentation
uses: ./.github/workflows/analysis.yml
secrets: inherit

deploy-doc:
# do not run on PR events
if: github.event_name == 'push'
needs: documentation
uses: ./.github/workflows/deploy-doc.yml
secrets: inherit
#deploy-doc:
# # do not run on PR events
# if: github.event_name == 'push'
# needs: documentation
# uses: ./.github/workflows/deploy-doc.yml
# secrets: inherit

0 comments on commit 9fe38eb

Please sign in to comment.