Use Int64 instead of size_t for sizes in IMemoryPool
#4309
Workflow file for this run
This file contains hidden or 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: Header/Encoding/Git checker | |
| on: | |
| pull_request: | |
| branches: [ main ] | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| env: | |
| # Arcane | |
| ARCANE_SOURCE_DIR: '/home/runner/work/framework/framework/arcane' | |
| jobs: | |
| check-headers: | |
| name: Check pull request | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| path: ${{ env.ARCANE_SOURCE_DIR }} | |
| fetch-depth: 0 | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| - name: Get hash commits | |
| shell: bash | |
| run: | | |
| cd ${{ env.ARCANE_SOURCE_DIR }} | |
| MY_COMMIT=$(git rev-parse HEAD) | |
| echo "My commit : $MY_COMMIT" | |
| echo "MY_COMMIT=${MY_COMMIT}" >> $GITHUB_ENV | |
| PARENT_BRANCH="$(git rev-parse origin/main)" | |
| echo "Parent branch : $PARENT_BRANCH" | |
| echo "PARENT_BRANCH=${PARENT_BRANCH}" >> $GITHUB_ENV | |
| if [[ $MY_COMMIT == $PARENT_BRANCH ]]; then | |
| echo "Already on the parent branch, exit" | |
| exit 0 | |
| fi | |
| COMMON_COMMIT=$(git merge-base $PARENT_BRANCH $MY_COMMIT) | |
| if [[ $MY_COMMIT == $COMMON_COMMIT ]]; then | |
| echo "Already merged branch" | |
| FIRST_MERGE_AFTER_MY_BRANCH=$(git rev-list --merges "$MY_COMMIT..$PARENT_BRANCH" | tail -1) | |
| echo "First merge after my branch : $FIRST_MERGE_AFTER_MY_BRANCH" | |
| COMMON_COMMIT=$(git rev-parse "$FIRST_MERGE_AFTER_MY_BRANCH^") | |
| else | |
| echo "Not merged branch" | |
| fi | |
| echo "Common commit : $COMMON_COMMIT" | |
| echo "COMMON_COMMIT=${COMMON_COMMIT}" >> $GITHUB_ENV | |
| - name: Merge detection | |
| id: merge-detection | |
| if: "${{ env.MY_COMMIT != env.PARENT_BRANCH }}" | |
| shell: bash | |
| run: | | |
| cd ${{ env.ARCANE_SOURCE_DIR }} | |
| git log --merges --oneline --ancestry-path "${{ env.COMMON_COMMIT }}..${{ env.MY_COMMIT }}" > merge.log | |
| if [ -s merge.log ]; then | |
| echo "::error::Merge main into your branch detected. Use rebase instead (see commands to fix it in this section)." | |
| echo "You can select 'Update with rebase' on GitHub PR page to update your branch with rebase ( https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/keeping-your-pull-request-in-sync-with-the-base-branch )." | |
| echo "You can also remove the merge(s) with the same button, if available." | |
| echo "If this button is not available, you can execute the commands below to fix your local branch and force push to remove the merge(s)." | |
| echo "::group::Merge commit(s) :" | |
| cat merge.log | |
| echo "::endgroup::" | |
| echo "::group::Commands to fix it :" | |
| echo "# Save your current working tree (if needed)." | |
| echo "git stash" | |
| echo " " | |
| echo "# Checkout your branch (if needed)." | |
| echo "git checkout YOUR_BRANCH" | |
| echo " " | |
| echo "# Fetch from origin and update your branch." | |
| echo "git pull" | |
| echo " " | |
| echo "# Rebase branch to main." | |
| echo "git rebase --no-rebase-merges origin/main" | |
| echo " " | |
| echo "# Check your branch before force push !!! (with 'gitk' for example)" | |
| echo "git push -f" | |
| echo " " | |
| echo "# Get your working tree back (if needed)." | |
| echo "git stash pop" | |
| echo " " | |
| echo "::endgroup::" | |
| exit 1 | |
| fi | |
| - name: Check files | |
| id: check-files | |
| if: "${{ always() && env.MY_COMMIT != env.PARENT_BRANCH }}" | |
| shell: bash | |
| run: | | |
| cd ${{ env.ARCANE_SOURCE_DIR }} | |
| export CC_H_FILES=$(git diff --name-only --no-renames --diff-filter=a "${{ env.MY_COMMIT }}..${{ env.COMMON_COMMIT }}" -- '*.cc' '*.h') | |
| echo "::group::Files to check :" | |
| echo "$CC_H_FILES" | |
| echo "::endgroup::" | |
| echo "::notice::In case of error, see the section 'Error details of Check files step' or the artifact 'Header Check Logs'." | |
| chmod u+x ${{ env.ARCANE_SOURCE_DIR }}/.github/scripts/header_check.sh | |
| ${{ env.ARCANE_SOURCE_DIR }}/.github/scripts/header_check.sh > ${{ env.ARCANE_SOURCE_DIR }}/output.log | |
| - name: Error details of Check files step | |
| if: ${{ failure() && steps.check-files.conclusion == 'failure' }} | |
| shell: bash | |
| run: | | |
| cat ${{ env.ARCANE_SOURCE_DIR }}/output.log | |
| - name: Upload the logs artifact | |
| uses: actions/upload-artifact@v6 | |
| if: ${{ failure() && steps.check-files.conclusion == 'failure' }} | |
| with: | |
| name: Header Check Logs | |
| path: ${{ env.ARCANE_SOURCE_DIR }}/output.log | |
| retention-days: 7 |