Skip to content

Commit

Permalink
Sync DDC version 5132cbb
Browse files Browse the repository at this point in the history
  • Loading branch information
SELF_COMMIT_TOKEN committed Jun 22, 2023
1 parent 37976ab commit 6e39a42
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
1 change: 1 addition & 0 deletions vendor/ddc/.github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:
- name: Publish site
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && needs.id_repo.outputs.in_base_repo == 'true' }}
run: |
git fetch --all -p
git worktree add -B gh-pages public remotes/origin/gh-pages
find public -mindepth 1 -maxdepth 1 '!' -name .git -exec rm -rf '{}' '+'
cp -a docs_out/html/* public/
Expand Down
25 changes: 19 additions & 6 deletions vendor/ddc/.github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ jobs:

id_repo:
runs-on: ubuntu-latest
outputs: { in_base_repo: '${{ steps.identify_repo.outputs.in_base_repo }}' }
steps:
- name: Identify repository
id: identify_repo
run: |
echo "in_base_repo=${{ (github.event_name == 'push' && github.repository == 'Maison-de-la-Simulation/ddc') || github.event.pull_request.head.repo.full_name == 'Maison-de-la-Simulation/ddc' }}" >> "$GITHUB_OUTPUT"
outputs: { in_base_repo: '${{ steps.identify_repo.outputs.in_base_repo }}' }

docker-build-env:
docker-build:
strategy:
matrix: { image: ['test_env', 'jammy_env'] }
needs: id_repo
Expand Down Expand Up @@ -63,7 +63,7 @@ jobs:
path: ${{matrix.image}}.tar
retention-days: 1

test-build-and-run:
test:
strategy:
fail-fast: false
matrix:
Expand All @@ -83,7 +83,7 @@ jobs:
image: 'jammy_env'
cxx_version: '23'
runs-on: ubuntu-latest
needs: [docker-build-env, id_repo]
needs: [docker-build, id_repo]
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
Expand All @@ -100,7 +100,8 @@ jobs:
run: |
docker load < ${{matrix.image}}.tar
rm ${{matrix.image}}.tar
- name: Build
- name: Test
id: test
run: |
cat<<-'EOF' > run.sh
set -xe
Expand Down Expand Up @@ -152,4 +153,16 @@ jobs:
;;
esac
EOF
docker run -v ${PWD}:/src:ro ghcr.io/maison-de-la-simulation/ddc/${{matrix.image}}:${GITHUB_SHA:0:7} bash /src/run.sh
docker run \
--cidfile='docker.cid' \
-v ${PWD}:/src:ro ghcr.io/maison-de-la-simulation/ddc/${{matrix.image}}:${GITHUB_SHA:0:7} \
bash /src/run.sh
if docker cp "$(cat docker.cid)":/data/tests.xml /home/runner/work/ddc/ddc/tests.xml
then echo "with_report=true" >> "$GITHUB_OUTPUT"
else echo "with_report=false" >> "$GITHUB_OUTPUT"
fi
- name: Publish Test Report
uses: mikepenz/action-junit-report@v3
if: ( success() || failure() ) && steps.test.outputs.with_report == 'true' # always run even if the previous step fails
with:
report_paths: '/home/runner/work/ddc/ddc/tests.xml'

0 comments on commit 6e39a42

Please sign in to comment.