Fix some warnings, keeping sign-compare warnings #1091
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: pages | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
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 == 'CExA-project/ddc') || github.event.pull_request.head.repo.full_name == 'CExA-project/ddc' }}" >> "$GITHUB_OUTPUT" | |
docker-build: | |
needs: id_repo | |
runs-on: ubuntu-latest | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/[email protected] | |
with: { tool-cache: true, large-packages: false } | |
- name: Checkout built branch | |
uses: actions/checkout@v3 | |
- name: Build | |
run: | | |
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin || true | |
docker pull ghcr.io/cexa-project/ddc/doxygen || true | |
docker build \ | |
--cache-from ghcr.io/cexa-project/ddc/doxygen \ | |
-t ghcr.io/cexa-project/ddc/doxygen \ | |
-t ghcr.io/cexa-project/ddc/doxygen:${GITHUB_SHA:0:7} \ | |
docker/doxygen | |
- name: Publish image for current SHA | |
if: needs.id_repo.outputs.in_base_repo == 'true' | |
run: | | |
docker push ghcr.io/cexa-project/ddc/doxygen:${GITHUB_SHA:0:7} | |
- name: Publish latest (default) image | |
if: github.event_name == 'push' && github.ref_name == 'main' && needs.id_repo.outputs.in_base_repo == 'true' | |
run: | | |
docker push ghcr.io/cexa-project/ddc/doxygen | |
- name: Create image tarball | |
if: needs.id_repo.outputs.in_base_repo == 'false' | |
run: | | |
docker save ghcr.io/cexa-project/ddc/doxygen:${GITHUB_SHA:0:7} > doxygen.tar | |
- name: Generate docker artifact from image | |
if: needs.id_repo.outputs.in_base_repo == 'false' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: doxygen-artifact | |
path: doxygen.tar | |
retention-days: 1 | |
pages: | |
runs-on: ubuntu-latest | |
needs: [docker-build, id_repo] | |
steps: | |
- name: Free Disk Space (Ubuntu) | |
uses: jlumbroso/[email protected] | |
with: { tool-cache: true, large-packages: false } | |
- name: Checkout built branch | |
uses: actions/checkout@v3 | |
with: { submodules: recursive } | |
- name: Collect image artifact | |
if: needs.id_repo.outputs.in_base_repo == 'false' | |
uses: actions/download-artifact@v3 | |
with: { name: 'doxygen-artifact' } | |
- name: Load image artifact into docker | |
if: needs.id_repo.outputs.in_base_repo == 'false' | |
run: | | |
docker load < doxygen.tar | |
rm doxygen.tar | |
- name: Build site | |
run: | | |
cat<<-EOF > run.sh | |
set -xe | |
git config --global --add safe.directory '*' | |
export CC=clang | |
export CXX=clang++ | |
cmake \ | |
-DBUILD_DOCUMENTATION=ON \ | |
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \ | |
-DCMAKE_CXX_STANDARD=20 \ | |
-DMDSPAN_CXX_STANDARD=20 \ | |
-DKokkos_ENABLE_DEPRECATION_WARNINGS=OFF \ | |
-DCMAKE_CXX_FLAGS="-Wno-gnu-zero-variadic-macro-arguments -Wno-unused-command-line-argument" \ | |
/src | |
make VERBOSE=1 doc | |
mv docs/html /src/docs_out | |
EOF | |
mkdir docs_out | |
chmod a+rwx docs_out | |
docker run -v ${PWD}:/src ghcr.io/cexa-project/ddc/doxygen:${GITHUB_SHA:0:7} bash /src/run.sh | |
- name: Publish site | |
if: ${{ github.event_name == 'push' && github.ref_name == 'main' && needs.id_repo.outputs.in_base_repo == 'true' }} | |
run: | | |
git fetch origin gh-pages | |
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/ | |
echo "ddc.mdls.fr" > public/CNAME | |
git -C public config user.name "${GITHUB_ACTOR}" | |
git -C public config user.email "${GITHUB_ACTOR}@noreply.example.com" | |
git -C public add -A . | |
git -C public commit -a -m "Update to match ${GITHUB_SHA} by ${GITHUB_EVENT_NAME} ${GITHUB_RUN_NUMBER}" || true | |
git -C public push |