From a4013b6168aee724d2fef687153ab43b9ef003bd Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Wed, 23 Mar 2022 16:12:53 -0500 Subject: [PATCH 01/11] Add a CI for spelling check --- .github/workflows/mega-linter.yml | 82 +++++++++++++++++++++++++++++++ .mega-linter.yml | 10 ++++ doc/README_Linux.md | 2 +- doc/README_macOS.md | 2 - doc/README~8.12.md | 2 +- doc/README~8.13~2021.02.md | 4 +- doc/README~8.13~2021.09.md | 2 +- doc/README~8.13~2022.01.md | 2 +- doc/README~8.14~2022.01.md | 4 +- doc/README~8.15~2022.03.md | 4 +- doc/README~dev.md | 4 +- 11 files changed, 104 insertions(+), 14 deletions(-) create mode 100644 .github/workflows/mega-linter.yml create mode 100644 .mega-linter.yml diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml new file mode 100644 index 0000000000..b58fd50a0b --- /dev/null +++ b/.github/workflows/mega-linter.yml @@ -0,0 +1,82 @@ +--- +# MegaLinter GitHub Action configuration file +# More info at https://megalinter.github.io +name: MegaLinter + +on: + # Trigger mega-linter at every push. Action will also be visible from Pull Requests to master + push: # Comment this line to trigger action only on pull-requests (not recommended if you don't pay for GH Actions) + pull_request: + branches: [master, main] + +env: # Comment env block if you do not want to apply fixes + # Apply linter fixes configuration + APPLY_FIXES: all # When active, APPLY_FIXES must also be defined as environment variable (in github/workflows/mega-linter.yml or other CI tool) + APPLY_FIXES_EVENT: pull_request # Decide which event triggers application of fixes in a commit or a PR (pull_request, push, all) + APPLY_FIXES_MODE: commit # If APPLY_FIXES is used, defines if the fixes are directly committed (commit) or posted in a PR (pull_request) + +concurrency: + group: ${{ github.ref }}-${{ github.workflow }} + cancel-in-progress: true + +jobs: + build: + name: MegaLinter + runs-on: ubuntu-latest + steps: + # Git Checkout + - name: Checkout Code + uses: actions/checkout@v2 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + fetch-depth: 0 + + # MegaLinter + - name: MegaLinter + id: ml + # You can override MegaLinter flavor used to have faster performances + # More info at https://megalinter.github.io/flavors/ + uses: megalinter/megalinter@v5 + env: + # All available variables are described in documentation + # https://megalinter.github.io/configuration/ + VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Set 'true' if you always want to lint all sources + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY + + # Upload MegaLinter artifacts + - name: Archive production artifacts + if: ${{ success() }} || ${{ failure() }} + uses: actions/upload-artifact@v2 + with: + name: MegaLinter reports + path: | + report + mega-linter.log + + # Create pull request if applicable (for now works only on PR from same repository, not from forks) + - name: Create Pull Request with applied fixes + id: cpr + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + uses: peter-evans/create-pull-request@v3 + with: + token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + commit-message: "[MegaLinter] Apply linters automatic fixes" + title: "[MegaLinter] Apply linters automatic fixes" + labels: bot + - name: Create PR output + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + run: | + echo "Pull Request Number - ${{ steps.cpr.outputs.pull-request-number }}" + echo "Pull Request URL - ${{ steps.cpr.outputs.pull-request-url }}" + + # Push new commit if applicable (for now works only on PR from same repository, not from forks) + - name: Prepare commit + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + run: sudo chown -Rc $UID .git/ + - name: Commit and push applied linter fixes + if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'commit' && github.ref != 'refs/heads/main' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') + uses: stefanzweifel/git-auto-commit-action@v4 + with: + branch: ${{ github.event.pull_request.head.ref || github.head_ref || github.ref }} + commit_message: "[MegaLinter] Apply linters fixes" diff --git a/.mega-linter.yml b/.mega-linter.yml new file mode 100644 index 0000000000..00de687f3b --- /dev/null +++ b/.mega-linter.yml @@ -0,0 +1,10 @@ +# Configuration file for MegaLinter +# See all available variables at https://megalinter.github.io/configuration/ and in linters documentation + +APPLY_FIXES: all # all, none, or list of linter keys +# ENABLE: # If you use ENABLE variable, all other languages/formats/tooling-formats will be disabled by default +ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default + - SPELL_MISSPELL +SHOW_ELAPSED_TIME: true +FILEIO_REPORTER: false +# DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass diff --git a/doc/README_Linux.md b/doc/README_Linux.md index 779c59f63e..68cd72870d 100755 --- a/doc/README_Linux.md +++ b/doc/README_Linux.md @@ -77,7 +77,7 @@ This method is intended for experienced users, who may want to use opam to insta - Debian, Ubuntu: sudo apt-get install build-essential - CentOS, RHEL, Fedora: sudo dnf groupinstall "Development Tools" - OpenSuse: sudo zypper in -t pattern devel_C_C++ -- For CentOS and possibly RHEL some additional steps are required, see [CentOS](#centos) below. +- For CentOS and possibly RHEL some additional steps are required, see [CentOS](#centos-enable-sudo-for-current-user) below. - Get the Coq Platform scripts via either of these methods - Most users should download and extract `https://github.com/coq/platform/archive/refs/tags/2022.01.0.zip`. - Users which intend to contribute to Coq Platform should use `git clone --branch 2022.01.0 https://github.com/coq/platform.git`. diff --git a/doc/README_macOS.md b/doc/README_macOS.md index 5f8e0dbc72..a5ab908b28 100644 --- a/doc/README_macOS.md +++ b/doc/README_macOS.md @@ -22,8 +22,6 @@ right click the `Coq_Platform` app in `/Applications` in Finder and select `open - In case you want to use the installed `coqc` from the command line, please add the folder `/Applications/Coq_Platform_2022.01.0.app/Contents/Resources/bin` to your `PATH`. - If you want to inspect the installed content, right click the `Coq_Platform` app in `/Applications` in Finder and select `Show Package Contents`. -A note to lecturers: it is easy to create a customized Windows installer from an opam switch - see [Customized Installers](#customized-installers) - # Installation by compiling from Sources using opam This method is intended for experienced users, who may want to use opam to install additional packages, beyond the standard set provided by the Coq Platform. diff --git a/doc/README~8.12.md b/doc/README~8.12.md index c9c594947c..e95448e147 100644 --- a/doc/README~8.12.md +++ b/doc/README~8.12.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: diff --git a/doc/README~8.13~2021.02.md b/doc/README~8.13~2021.02.md index c46d2ea3d7..de2c4793ee 100644 --- a/doc/README~8.13~2021.02.md +++ b/doc/README~8.13~2021.02.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: @@ -248,7 +248,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to _CoqProject:
-arg -noinit
-arg -indices-matter
+
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to `_CoqProject`:
-arg -noinit
-arg -indices-matter
diff --git a/doc/README~8.13~2021.09.md b/doc/README~8.13~2021.09.md index 31327af485..6be0b6ee01 100644 --- a/doc/README~8.13~2021.09.md +++ b/doc/README~8.13~2021.09.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: diff --git a/doc/README~8.13~2022.01.md b/doc/README~8.13~2022.01.md index 8b74e2540e..94120387e3 100644 --- a/doc/README~8.13~2022.01.md +++ b/doc/README~8.13~2022.01.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: diff --git a/doc/README~8.14~2022.01.md b/doc/README~8.14~2022.01.md index 6e8a098cc2..6c920cdb5f 100644 --- a/doc/README~8.14~2022.01.md +++ b/doc/README~8.14~2022.01.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: @@ -353,7 +353,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to _CoqProject:
-arg -noinit
-arg -indices-matter
+
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to `_CoqProject`:
-arg -noinit
-arg -indices-matter
diff --git a/doc/README~8.15~2022.03.md b/doc/README~8.15~2022.03.md index 8ecd849a94..a6c5cc9a1f 100644 --- a/doc/README~8.15~2022.03.md +++ b/doc/README~8.15~2022.03.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: @@ -353,7 +353,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to _CoqProject:
-arg -noinit
-arg -indices-matter
+
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to `_CoqProject`:
-arg -noinit
-arg -indices-matter
diff --git a/doc/README~dev.md b/doc/README~dev.md index abc8e27b2a..11f0b90932 100644 --- a/doc/README~dev.md +++ b/doc/README~dev.md @@ -98,7 +98,7 @@ developments. The packages in the **full level** are mature, well maintained and suitable as basis for your own developments. -See the Coq Platform [charter](charter.md) for details. +See the Coq Platform [charter](../charter.md) for details. The **full level** contains the following packages: @@ -350,7 +350,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:n -noinit -indices-matternnTo use the HoTT library in a project, add the following to _CoqProject:n -arg -noinitn -arg -indices-mattern`
+
description
To use the HoTT library, the following flags must be passed to coqc:n -noinit -indices-matternnTo use the HoTT library in a project, add the following to `_CoqProject`:n -arg -noinitn -arg -indices-mattern`
From 94bacece5608842f0fcdf496719e1125a31c9e06 Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Wed, 23 Mar 2022 16:22:11 -0500 Subject: [PATCH 02/11] Enable spell check on everything to test --- .github/workflows/mega-linter.yml | 2 +- doc/README~8.13~2021.02.md | 2 +- doc/README~8.14~2022.01.md | 2 +- doc/README~8.15~2022.03.md | 2 +- doc/README~dev.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index b58fd50a0b..dc2b76fc89 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -40,7 +40,7 @@ jobs: env: # All available variables are described in documentation # https://megalinter.github.io/configuration/ - VALIDATE_ALL_CODEBASE: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Set 'true' if you always want to lint all sources + VALIDATE_ALL_CODEBASE: true # ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Set 'true' if you always want to lint all sources GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY diff --git a/doc/README~8.13~2021.02.md b/doc/README~8.13~2021.02.md index de2c4793ee..6303a7a639 100644 --- a/doc/README~8.13~2021.02.md +++ b/doc/README~8.13~2021.02.md @@ -248,7 +248,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to `_CoqProject`:
-arg -noinit
-arg -indices-matter
+
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to _CoqProject:
-arg -noinit
-arg -indices-matter
diff --git a/doc/README~8.14~2022.01.md b/doc/README~8.14~2022.01.md index 6c920cdb5f..e33c947fc8 100644 --- a/doc/README~8.14~2022.01.md +++ b/doc/README~8.14~2022.01.md @@ -353,7 +353,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to `_CoqProject`:
-arg -noinit
-arg -indices-matter
+
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to _CoqProject:
-arg -noinit
-arg -indices-matter
diff --git a/doc/README~8.15~2022.03.md b/doc/README~8.15~2022.03.md index a6c5cc9a1f..a5805aab2c 100644 --- a/doc/README~8.15~2022.03.md +++ b/doc/README~8.15~2022.03.md @@ -353,7 +353,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to `_CoqProject`:
-arg -noinit
-arg -indices-matter
+
description
To use the HoTT library, the following flags must be passed to coqc:
-noinit -indices-matter
To use the HoTT library in a project, add the following to _CoqProject:
-arg -noinit
-arg -indices-matter
diff --git a/doc/README~dev.md b/doc/README~dev.md index 11f0b90932..10b33d4533 100644 --- a/doc/README~dev.md +++ b/doc/README~dev.md @@ -350,7 +350,7 @@ The **full level** contains the following packages: (bug reports) (opam package) -
description
To use the HoTT library, the following flags must be passed to coqc:n -noinit -indices-matternnTo use the HoTT library in a project, add the following to `_CoqProject`:n -arg -noinitn -arg -indices-mattern`
+
description
To use the HoTT library, the following flags must be passed to coqc:n -noinit -indices-matternnTo use the HoTT library in a project, add the following to _CoqProject:n -arg -noinitn -arg -indices-mattern`
From 88f7c37ea9a1190208d8ba75380e843b07bafdb3 Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Wed, 23 Mar 2022 16:30:08 -0500 Subject: [PATCH 03/11] One more try --- .github/workflows/mega-linter.yml | 2 +- .mega-linter.yml | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index dc2b76fc89..0f79e7545c 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -40,7 +40,7 @@ jobs: env: # All available variables are described in documentation # https://megalinter.github.io/configuration/ - VALIDATE_ALL_CODEBASE: true # ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} # Validates all source when push on main, else just the git diff with main. Set 'true' if you always want to lint all sources + VALIDATE_ALL_CODEBASE: true # Set ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} to validate only diff with main branch GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY diff --git a/.mega-linter.yml b/.mega-linter.yml index 00de687f3b..0272519f25 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -3,8 +3,12 @@ APPLY_FIXES: all # all, none, or list of linter keys # ENABLE: # If you use ENABLE variable, all other languages/formats/tooling-formats will be disabled by default -ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default - - SPELL_MISSPELL -SHOW_ELAPSED_TIME: true +# ENABLE_LINTERS: # If you use ENABLE_LINTERS variable, all other linters will be disabled by default +DISABLE: + - COPYPASTE # Comment to enable checks of excessive copy-pastes + # - SPELL # Uncomment to disable checks of spelling mistakes +DISABLE_LINTERS: +- SPELL_CSPELL +SHOW_ELAPSED_TIME: false FILEIO_REPORTER: false # DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass From 83671627b4558fdb52798f8fe8bb32459e01edb3 Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Wed, 23 Mar 2022 16:46:38 -0500 Subject: [PATCH 04/11] Disable unneeded linters --- .markdown-link-check.json | 8 ++++++++ .mega-linter.yml | 7 ++++++- 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 .markdown-link-check.json diff --git a/.markdown-link-check.json b/.markdown-link-check.json new file mode 100644 index 0000000000..ecf5d634e5 --- /dev/null +++ b/.markdown-link-check.json @@ -0,0 +1,8 @@ +{ + "replacementPatterns": [ + { + "pattern": "^/", + "replacement": "{{BASEURL}}/" + } + ] +} diff --git a/.mega-linter.yml b/.mega-linter.yml index 0272519f25..35ba2a8d82 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -8,7 +8,12 @@ DISABLE: - COPYPASTE # Comment to enable checks of excessive copy-pastes # - SPELL # Uncomment to disable checks of spelling mistakes DISABLE_LINTERS: -- SPELL_CSPELL + - SPELL_CSPELL + - ACTION_ACTIONLINT + - BASH_SHELLCHECK + - C_CPPLINT + - BASH_SHFMT + - MARKDOWN_MARKDOWNLINT SHOW_ELAPSED_TIME: false FILEIO_REPORTER: false # DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass From 184db9ef704d29a4d52ccee0f5294792285fd10a Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Wed, 23 Mar 2022 16:58:37 -0500 Subject: [PATCH 05/11] Improve performance by switching to python flavor --- .github/workflows/mega-linter.yml | 2 +- package_picks/coq_platform_release.sh | 0 package_picks/coq_platform_switch_name.sh | 0 package_picks/package-pick-8.12.sh | 0 package_picks/package-pick-8.13~2021.02.sh | 0 package_picks/package-pick-8.13~2021.09.sh | 0 package_picks/package-pick-8.13~2022.01.sh | 0 package_picks/package-pick-8.14~2022.01.sh | 0 package_picks/package-pick-8.15~2022.03.sh | 0 package_picks/package-pick-dev.sh | 0 shell_scripts/ask_compcert_open_source.sh | 0 shell_scripts/ask_delete_opam_switch.sh | 0 shell_scripts/ask_introduction.sh | 0 shell_scripts/ask_packagelist.sh | 0 shell_scripts/ask_parallel_build.sh | 0 shell_scripts/ask_vst.sh | 0 shell_scripts/build.sh | 0 shell_scripts/check_compiler.sh | 0 shell_scripts/check_opam_sandbox.sh | 0 shell_scripts/check_system.sh | 0 shell_scripts/closing_remarks.sh | 0 shell_scripts/coq_platform_override_dev_pkg.sh | 0 shell_scripts/get_names_from_switch.sh | 0 shell_scripts/init_paths.sh | 0 shell_scripts/init_safety_debug.sh | 0 shell_scripts/init_utilities.sh | 0 shell_scripts/install_opam.sh | 0 shell_scripts/install_opam_depext.sh | 0 shell_scripts/install_system_prerequisites.sh | 0 shell_scripts/parse_cmdline_arguments.sh | 0 shell_scripts/sanitize_environment.sh | 0 31 files changed, 1 insertion(+), 1 deletion(-) mode change 100644 => 100755 package_picks/coq_platform_release.sh mode change 100644 => 100755 package_picks/coq_platform_switch_name.sh mode change 100644 => 100755 package_picks/package-pick-8.12.sh mode change 100644 => 100755 package_picks/package-pick-8.13~2021.02.sh mode change 100644 => 100755 package_picks/package-pick-8.13~2021.09.sh mode change 100644 => 100755 package_picks/package-pick-8.13~2022.01.sh mode change 100644 => 100755 package_picks/package-pick-8.14~2022.01.sh mode change 100644 => 100755 package_picks/package-pick-8.15~2022.03.sh mode change 100644 => 100755 package_picks/package-pick-dev.sh mode change 100644 => 100755 shell_scripts/ask_compcert_open_source.sh mode change 100644 => 100755 shell_scripts/ask_delete_opam_switch.sh mode change 100644 => 100755 shell_scripts/ask_introduction.sh mode change 100644 => 100755 shell_scripts/ask_packagelist.sh mode change 100644 => 100755 shell_scripts/ask_parallel_build.sh mode change 100644 => 100755 shell_scripts/ask_vst.sh mode change 100644 => 100755 shell_scripts/build.sh mode change 100644 => 100755 shell_scripts/check_compiler.sh mode change 100644 => 100755 shell_scripts/check_opam_sandbox.sh mode change 100644 => 100755 shell_scripts/check_system.sh mode change 100644 => 100755 shell_scripts/closing_remarks.sh mode change 100644 => 100755 shell_scripts/coq_platform_override_dev_pkg.sh mode change 100644 => 100755 shell_scripts/get_names_from_switch.sh mode change 100644 => 100755 shell_scripts/init_paths.sh mode change 100644 => 100755 shell_scripts/init_safety_debug.sh mode change 100644 => 100755 shell_scripts/init_utilities.sh mode change 100644 => 100755 shell_scripts/install_opam.sh mode change 100644 => 100755 shell_scripts/install_opam_depext.sh mode change 100644 => 100755 shell_scripts/install_system_prerequisites.sh mode change 100644 => 100755 shell_scripts/parse_cmdline_arguments.sh mode change 100644 => 100755 shell_scripts/sanitize_environment.sh diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 0f79e7545c..3af6b21e91 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -36,7 +36,7 @@ jobs: id: ml # You can override MegaLinter flavor used to have faster performances # More info at https://megalinter.github.io/flavors/ - uses: megalinter/megalinter@v5 + uses: megalinter/megalinter/flavors/python@v5 env: # All available variables are described in documentation # https://megalinter.github.io/configuration/ diff --git a/package_picks/coq_platform_release.sh b/package_picks/coq_platform_release.sh old mode 100644 new mode 100755 diff --git a/package_picks/coq_platform_switch_name.sh b/package_picks/coq_platform_switch_name.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-8.12.sh b/package_picks/package-pick-8.12.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-8.13~2021.02.sh b/package_picks/package-pick-8.13~2021.02.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-8.13~2021.09.sh b/package_picks/package-pick-8.13~2021.09.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-8.13~2022.01.sh b/package_picks/package-pick-8.13~2022.01.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-8.14~2022.01.sh b/package_picks/package-pick-8.14~2022.01.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-8.15~2022.03.sh b/package_picks/package-pick-8.15~2022.03.sh old mode 100644 new mode 100755 diff --git a/package_picks/package-pick-dev.sh b/package_picks/package-pick-dev.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/ask_compcert_open_source.sh b/shell_scripts/ask_compcert_open_source.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/ask_delete_opam_switch.sh b/shell_scripts/ask_delete_opam_switch.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/ask_introduction.sh b/shell_scripts/ask_introduction.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/ask_packagelist.sh b/shell_scripts/ask_packagelist.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/ask_parallel_build.sh b/shell_scripts/ask_parallel_build.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/ask_vst.sh b/shell_scripts/ask_vst.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/build.sh b/shell_scripts/build.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/check_compiler.sh b/shell_scripts/check_compiler.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/check_opam_sandbox.sh b/shell_scripts/check_opam_sandbox.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/check_system.sh b/shell_scripts/check_system.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/closing_remarks.sh b/shell_scripts/closing_remarks.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/coq_platform_override_dev_pkg.sh b/shell_scripts/coq_platform_override_dev_pkg.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/get_names_from_switch.sh b/shell_scripts/get_names_from_switch.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/init_paths.sh b/shell_scripts/init_paths.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/init_safety_debug.sh b/shell_scripts/init_safety_debug.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/init_utilities.sh b/shell_scripts/init_utilities.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/install_opam.sh b/shell_scripts/install_opam.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/install_opam_depext.sh b/shell_scripts/install_opam_depext.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/install_system_prerequisites.sh b/shell_scripts/install_system_prerequisites.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/parse_cmdline_arguments.sh b/shell_scripts/parse_cmdline_arguments.sh old mode 100644 new mode 100755 diff --git a/shell_scripts/sanitize_environment.sh b/shell_scripts/sanitize_environment.sh old mode 100644 new mode 100755 From 64269d4c0b5674c0d5ab7986ae196b20995f260d Mon Sep 17 00:00:00 2001 From: MSoegtropIMC <7895506+MSoegtropIMC@users.noreply.github.com> Date: Thu, 24 Mar 2022 09:49:40 +0100 Subject: [PATCH 06/11] Set secret for creating PR --- .github/workflows/mega-linter.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 3af6b21e91..f81dfca184 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -27,9 +27,6 @@ jobs: # Git Checkout - name: Checkout Code uses: actions/checkout@v2 - with: - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} - fetch-depth: 0 # MegaLinter - name: MegaLinter @@ -41,7 +38,7 @@ jobs: # All available variables are described in documentation # https://megalinter.github.io/configuration/ VALIDATE_ALL_CODEBASE: true # Set ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} to validate only diff with main branch - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_LINT_SPELL }} # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY # Upload MegaLinter artifacts @@ -60,7 +57,7 @@ jobs: if: steps.ml.outputs.has_updated_sources == 1 && (env.APPLY_FIXES_EVENT == 'all' || env.APPLY_FIXES_EVENT == github.event_name) && env.APPLY_FIXES_MODE == 'pull_request' && (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && !contains(github.event.head_commit.message, 'skip fix') uses: peter-evans/create-pull-request@v3 with: - token: ${{ secrets.PAT || secrets.GITHUB_TOKEN }} + token: ${{ secrets.PAT_LINT_SPELL }} commit-message: "[MegaLinter] Apply linters automatic fixes" title: "[MegaLinter] Apply linters automatic fixes" labels: bot From b8b061a856967a99c6dbc26f37b73a6bdf71975d Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Thu, 24 Mar 2022 07:07:51 -0500 Subject: [PATCH 07/11] Restore file permissions by reverting part of the commit "Improve performance by switching to python flavor" commit 184db9ef704d29a4d52ccee0f5294792285fd10a. --- package_picks/coq_platform_release.sh | 0 package_picks/coq_platform_switch_name.sh | 0 package_picks/package-pick-8.12.sh | 0 package_picks/package-pick-8.13~2021.02.sh | 0 package_picks/package-pick-8.13~2021.09.sh | 0 package_picks/package-pick-8.13~2022.01.sh | 0 package_picks/package-pick-8.14~2022.01.sh | 0 package_picks/package-pick-8.15~2022.03.sh | 0 package_picks/package-pick-dev.sh | 0 shell_scripts/ask_compcert_open_source.sh | 0 shell_scripts/ask_delete_opam_switch.sh | 0 shell_scripts/ask_introduction.sh | 0 shell_scripts/ask_packagelist.sh | 0 shell_scripts/ask_parallel_build.sh | 0 shell_scripts/ask_vst.sh | 0 shell_scripts/build.sh | 0 shell_scripts/check_compiler.sh | 0 shell_scripts/check_opam_sandbox.sh | 0 shell_scripts/check_system.sh | 0 shell_scripts/closing_remarks.sh | 0 shell_scripts/coq_platform_override_dev_pkg.sh | 0 shell_scripts/get_names_from_switch.sh | 0 shell_scripts/init_paths.sh | 0 shell_scripts/init_safety_debug.sh | 0 shell_scripts/init_utilities.sh | 0 shell_scripts/install_opam.sh | 0 shell_scripts/install_opam_depext.sh | 0 shell_scripts/install_system_prerequisites.sh | 0 shell_scripts/parse_cmdline_arguments.sh | 0 shell_scripts/sanitize_environment.sh | 0 30 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 package_picks/coq_platform_release.sh mode change 100755 => 100644 package_picks/coq_platform_switch_name.sh mode change 100755 => 100644 package_picks/package-pick-8.12.sh mode change 100755 => 100644 package_picks/package-pick-8.13~2021.02.sh mode change 100755 => 100644 package_picks/package-pick-8.13~2021.09.sh mode change 100755 => 100644 package_picks/package-pick-8.13~2022.01.sh mode change 100755 => 100644 package_picks/package-pick-8.14~2022.01.sh mode change 100755 => 100644 package_picks/package-pick-8.15~2022.03.sh mode change 100755 => 100644 package_picks/package-pick-dev.sh mode change 100755 => 100644 shell_scripts/ask_compcert_open_source.sh mode change 100755 => 100644 shell_scripts/ask_delete_opam_switch.sh mode change 100755 => 100644 shell_scripts/ask_introduction.sh mode change 100755 => 100644 shell_scripts/ask_packagelist.sh mode change 100755 => 100644 shell_scripts/ask_parallel_build.sh mode change 100755 => 100644 shell_scripts/ask_vst.sh mode change 100755 => 100644 shell_scripts/build.sh mode change 100755 => 100644 shell_scripts/check_compiler.sh mode change 100755 => 100644 shell_scripts/check_opam_sandbox.sh mode change 100755 => 100644 shell_scripts/check_system.sh mode change 100755 => 100644 shell_scripts/closing_remarks.sh mode change 100755 => 100644 shell_scripts/coq_platform_override_dev_pkg.sh mode change 100755 => 100644 shell_scripts/get_names_from_switch.sh mode change 100755 => 100644 shell_scripts/init_paths.sh mode change 100755 => 100644 shell_scripts/init_safety_debug.sh mode change 100755 => 100644 shell_scripts/init_utilities.sh mode change 100755 => 100644 shell_scripts/install_opam.sh mode change 100755 => 100644 shell_scripts/install_opam_depext.sh mode change 100755 => 100644 shell_scripts/install_system_prerequisites.sh mode change 100755 => 100644 shell_scripts/parse_cmdline_arguments.sh mode change 100755 => 100644 shell_scripts/sanitize_environment.sh diff --git a/package_picks/coq_platform_release.sh b/package_picks/coq_platform_release.sh old mode 100755 new mode 100644 diff --git a/package_picks/coq_platform_switch_name.sh b/package_picks/coq_platform_switch_name.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-8.12.sh b/package_picks/package-pick-8.12.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-8.13~2021.02.sh b/package_picks/package-pick-8.13~2021.02.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-8.13~2021.09.sh b/package_picks/package-pick-8.13~2021.09.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-8.13~2022.01.sh b/package_picks/package-pick-8.13~2022.01.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-8.14~2022.01.sh b/package_picks/package-pick-8.14~2022.01.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-8.15~2022.03.sh b/package_picks/package-pick-8.15~2022.03.sh old mode 100755 new mode 100644 diff --git a/package_picks/package-pick-dev.sh b/package_picks/package-pick-dev.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/ask_compcert_open_source.sh b/shell_scripts/ask_compcert_open_source.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/ask_delete_opam_switch.sh b/shell_scripts/ask_delete_opam_switch.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/ask_introduction.sh b/shell_scripts/ask_introduction.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/ask_packagelist.sh b/shell_scripts/ask_packagelist.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/ask_parallel_build.sh b/shell_scripts/ask_parallel_build.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/ask_vst.sh b/shell_scripts/ask_vst.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/build.sh b/shell_scripts/build.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/check_compiler.sh b/shell_scripts/check_compiler.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/check_opam_sandbox.sh b/shell_scripts/check_opam_sandbox.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/check_system.sh b/shell_scripts/check_system.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/closing_remarks.sh b/shell_scripts/closing_remarks.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/coq_platform_override_dev_pkg.sh b/shell_scripts/coq_platform_override_dev_pkg.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/get_names_from_switch.sh b/shell_scripts/get_names_from_switch.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/init_paths.sh b/shell_scripts/init_paths.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/init_safety_debug.sh b/shell_scripts/init_safety_debug.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/init_utilities.sh b/shell_scripts/init_utilities.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/install_opam.sh b/shell_scripts/install_opam.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/install_opam_depext.sh b/shell_scripts/install_opam_depext.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/install_system_prerequisites.sh b/shell_scripts/install_system_prerequisites.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/parse_cmdline_arguments.sh b/shell_scripts/parse_cmdline_arguments.sh old mode 100755 new mode 100644 diff --git a/shell_scripts/sanitize_environment.sh b/shell_scripts/sanitize_environment.sh old mode 100755 new mode 100644 From 614a17958cbe5a48e226bca91e35a22423f416f0 Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Thu, 24 Mar 2022 07:29:49 -0500 Subject: [PATCH 08/11] Fix GITHUB_TOKEN --- .github/workflows/mega-linter.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index f81dfca184..c4c5c704e7 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -38,7 +38,7 @@ jobs: # All available variables are described in documentation # https://megalinter.github.io/configuration/ VALIDATE_ALL_CODEBASE: true # Set ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} to validate only diff with main branch - GITHUB_TOKEN: ${{ secrets.PAT_LINT_SPELL }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY # Upload MegaLinter artifacts From fc8c136853d02b4aa021933e2212a2fa0cc212ac Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Thu, 24 Mar 2022 07:35:02 -0500 Subject: [PATCH 09/11] Restore token for GH action --- .github/workflows/mega-linter.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index c4c5c704e7..b7be83235f 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -27,6 +27,9 @@ jobs: # Git Checkout - name: Checkout Code uses: actions/checkout@v2 + with: + token: ${{ secrets.PAT_LINT_SPELL || secrets.GITHUB_TOKEN }} + fetch-depth: 0 # MegaLinter - name: MegaLinter From 7007a6e3f7524a9d4695f6b29c66bed885c969ef Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Thu, 24 Mar 2022 07:59:25 -0500 Subject: [PATCH 10/11] Try again using PAT environment variable --- .github/workflows/macos.yml | 166 --------------------------- .github/workflows/mega-linter.yml | 2 + .github/workflows/ubuntu.yml | 180 ------------------------------ .github/workflows/windows.yml | 142 ----------------------- 4 files changed, 2 insertions(+), 488 deletions(-) delete mode 100644 .github/workflows/macos.yml delete mode 100644 .github/workflows/ubuntu.yml delete mode 100644 .github/workflows/windows.yml diff --git a/.github/workflows/macos.yml b/.github/workflows/macos.yml deleted file mode 100644 index d7b930e871..0000000000 --- a/.github/workflows/macos.yml +++ /dev/null @@ -1,166 +0,0 @@ -# Main doc: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions -# Runners spec: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners -# Glob expressions: https://github.com/actions/toolkit/tree/main/packages/glob - -name: Macos - -############################################################################### -# Schedule: -# - push on any branch whose name matches v** or master -# - any pull request -############################################################################### -on: - push: - branches: - - 2021.02 - - 2021.09 - - main - pull_request: - branches: - - '**' - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - inputs: - platform: - description: 'Arguments for the platform script:' - required: true - default: '-extent=f -parallel=p -jobs=2 -vst=y -compcert=y -set-switch=y' - -############################################################################### -# Platform script options shared among all jobs -############################################################################### -env: - PLATFORM_ARGS: -extent=f -parallel=p -jobs=2 -vst=y -compcert=y -set-switch=y - COQREGTESTING: y - -############################################################################### -# Macos -# -# CAVEATS: -# - COQREGTESTING broken, it makes the script loop, so we install opam by hand -############################################################################### -jobs: - Macos_platform: - name: Macos - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - variant: - - '8.15~2022.03' - - '8.14~2022.01' - - steps: - - name: Git checkout - uses: actions/checkout@v2 - - - name: Set PLATFORM - if: ${{ github.event.inputs.platform != '' }} - run: echo "PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV - - - name: Install opam - env: - OPAM_VERSION: 2.0.7 - run: | - curl -L https://github.com/ocaml/opam/releases/download/${OPAM_VERSION}/opam-${OPAM_VERSION}-x86_64-macos > opam.${OPAM_VERSION} - chmod a+x opam.${OPAM_VERSION} - sudo cp opam.${OPAM_VERSION} /usr/local/bin/opam.${OPAM_VERSION} - sudo ln -s /usr/local/bin/opam.${OPAM_VERSION} /usr/local/bin/opam - - - name: Run common platform script - shell: bash - run: ./coq_platform_make.sh -packages=${{matrix.variant}} $PLATFORM_ARGS -dumplogs - - - name: Install bash (needed by smoke scripts) - run: brew install bash - - - name: Create smoke test kit - shell: bash - run: | - eval $(opam env) - shell_scripts/create_smoke_test_kit.sh - - - name: 'Upload smoke test kit' - uses: actions/upload-artifact@v2 - with: - name: 'Smoke Test Kit Macos ${{matrix.variant}}' - path: smoke-test-kit/ - retention-days: 5 - - - name: Install findutils, coreutils and macpack (needed by DMG script) - run: | - brew install findutils - brew install coreutils - brew install python@3.8 - pip3 install macpack - - - name: 'Build DMG installer' - shell: bash - run: | - eval $(opam env) - macos/create_installer_macos.sh - - - name: 'Upload DMG script logs on failure' - uses: actions/upload-artifact@v2 - if: failure() - with: - name: 'DMG script error logs ${{matrix.variant}}' - path: macos_installer/logs/ - - - name: 'Upload Artifact' - uses: actions/upload-artifact@v2 - with: - name: 'Macos installer ${{matrix.variant}}' - path: macos_installer/coq-*-installer-macos.dmg - retention-days: 5 - - Macos_smoke: - name: Smoke test Macos - needs: Macos_platform - runs-on: macos-latest - strategy: - fail-fast: false - matrix: - variant: - - '8.15~2022.03' - - '8.14~2022.01' - - steps: - - name: Install bash - run: brew install bash - - - name: 'Download Artifact' - uses: actions/download-artifact@v2 - id: download - with: - name: 'Macos installer ${{matrix.variant}}' - - - name: 'Download smoke test kit' - uses: actions/download-artifact@v2 - id: download-smoke - with: - name: 'Smoke Test Kit Macos ${{matrix.variant}}' - - - name: 'Run Installer' - shell: bash - run: | - cd ${{steps.download.outputs.download-path}} - DMG=$(ls coq-*-installer-macos.dmg) - hdiutil attach $DMG - cp -r /Volumes/${DMG%%.dmg}/Coq_*.app /Applications/ - hdiutil detach /Volumes/${DMG%%.dmg}/ - - - name: 'Smoke coqc' - shell: bash - run: | - cd /Applications/Coq_*.app/Contents/Resources/bin/ - ./coqc -v - - - name: 'Run Macos smoke test kit' - shell: bash - run: | - export PATH="$PATH:$(cd /Applications/Coq_*.app/Contents/Resources/bin/; pwd)" - cd ${{steps.download-smoke.outputs.download-path}} - chmod a+x ./run-smoke-test.sh - ./run-smoke-test.sh diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index b7be83235f..83b82ad6ff 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -27,6 +27,8 @@ jobs: # Git Checkout - name: Checkout Code uses: actions/checkout@v2 + env: + PAT: ${{ secrets.PAT_LINT_SPELL }} with: token: ${{ secrets.PAT_LINT_SPELL || secrets.GITHUB_TOKEN }} fetch-depth: 0 diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml deleted file mode 100644 index d3ffaefca0..0000000000 --- a/.github/workflows/ubuntu.yml +++ /dev/null @@ -1,180 +0,0 @@ -# Main doc: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions -# Runners spec: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners -# Glob expressions: https://github.com/actions/toolkit/tree/main/packages/glob - -name: Ubuntu - -############################################################################### -# Schedule: -# - push on any branch whose name matches v** or master -# - any pull request -############################################################################### -on: - push: - branches: - - 2021.02 - - 2021.09 - - main - pull_request: - branches: - - '**' - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - inputs: - platform: - description: 'Arguments for the platform script:' - required: true - default: '-extent=f -parallel=p -jobs=2 -vst=y -compcert=y -set-switch=y' - snap_pick: - description: 'Package pick for the snap package:' - default: 8.14~2022.01 - upload: - description: 'Upload artifact to Snap Store? (true/false, default false)' - default: false - -############################################################################### -# Platform script options shared among all jobs -############################################################################### -env: - PLATFORM: -extent=f -parallel=p -jobs=2 -vst=y -compcert=y -set-switch=y - COQREGTESTING: y - SNAP_PICK: 8.14~2022.01 - -############################################################################### -# Ubuntu -# -# CAVEATS: -# - you need bubblewrap or the script fails -# - build-essential pulls in the C toolchain -############################################################################### -jobs: - Ubuntu_platform: - name: Ubuntu - runs-on: ubuntu-latest - strategy: - fail-fast: false - matrix: - variant: - - '8.15~2022.03' - - '8.14~2022.01' - - '8.13~2021.02' - - '8.12' - - steps: - - name: Git checkout - uses: actions/checkout@v2 - - - name: Set PLATFORM - if: ${{ github.event.inputs.platform != '' }} - run: echo "PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV - - - name: Install bubblewrap and build-essential - run: | - sudo apt-get update - sudo apt-get install bubblewrap build-essential - - - name: Run common platform script - shell: bash - run: ./coq_platform_make.sh -packages=${{matrix.variant}} $PLATFORM -dumplogs - - - name: Create smoke test kit - shell: bash - run: | - eval $(opam env) - shell_scripts/create_smoke_test_kit.sh - - - name: 'Run Linux smoke test kit' - shell: bash - run: | - eval $(opam env) - smoke-test-kit/run-smoke-test.sh - - - name: 'Upload smoke test kit' - uses: actions/upload-artifact@v2 - with: - name: 'Smoke Test Kit ${{matrix.variant}}' - path: smoke-test-kit - retention-days: 5 - - Ubuntu_snap: - name: Snap package - runs-on: ubuntu-latest - - steps: - - name: Git checkout - uses: actions/checkout@v2 - - - name: Set PLATFORM - if: ${{ github.event.inputs.platform != '' }} - run: echo "PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV - - - name: Set SNAP_PICK - if: ${{ github.event.inputs.snap_pick != '' }} - run: echo "SNAP_PICK=${{ github.event.inputs.snap_pick }}" >> $GITHUB_ENV - - - name: Generate snapcraft file - run: linux/create_snapcraft_yaml.sh -packages=$SNAP_PICK $PLATFORM - - - name: Print snapcraft file - run: cat snap/snapcraft.yaml - - - name: Run snapcraft - uses: snapcore/action-build@v1.0.9 - id: build - - - name: Save Artifact - uses: actions/upload-artifact@v2 - with: - name: 'Snap package' - path: ${{ steps.build.outputs.snap }} - - - name: Upload Artifact to the Snap Store - if: ${{ github.event.inputs.upload }} - uses: snapcore/action-publish@v1 - with: - store_login: ${{ secrets.STORE_LOGIN }} - snap: ${{ steps.build.outputs.snap }} - release: edge - - # We run this one always because the Ubuntu_platform job - # has a matrix and contains the flaky dev job - # but here we really only need the SNAP_PICK one - # - # In any case the job will fail fast if it can't download - # the snap or the smoke test - Ubuntu_smoke: - name: Snap package smoke test - if: ${{ always() }} - needs: [Ubuntu_platform, Ubuntu_snap] - runs-on: ubuntu-latest - - steps: - - - name: Set SNAP_PICK - if: ${{ github.event.inputs.snap_pick != '' }} - run: echo "SNAP_PICK=${{ github.event.inputs.snap_pick }}" >> $GITHUB_ENV - - - name: Download Artifact - uses: actions/download-artifact@v2 - id: download-snap - with: - name: 'Snap package' - - - name: 'Download smoke test kit' - uses: actions/download-artifact@v2 - id: download-smoke - with: - name: 'Smoke Test Kit ${{ env.SNAP_PICK }}' - - - name: 'Install Snap' - run: | - sudo snap install --dangerous ${{ steps.download-snap.outputs.download-path }}/coq-prover_*.snap - sudo snap alias coq-prover.coqc coqc - - - name: 'Run Smoke Test Kit' - run: | - cd ${{steps.download-smoke.outputs.download-path}} - chmod a+x ./run-smoke-test.sh - ./run-smoke-test.sh - \ No newline at end of file diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml deleted file mode 100644 index e00b7c9a48..0000000000 --- a/.github/workflows/windows.yml +++ /dev/null @@ -1,142 +0,0 @@ -# Main doc: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/introduction-to-github-actions -# Runners spec: https://docs.github.com/en/free-pro-team@latest/actions/reference/specifications-for-github-hosted-runners -# Glob expressions: https://github.com/actions/toolkit/tree/main/packages/glob - -name: Windows - -############################################################################### -# Schedule: -# - push on any branch whose name matches v** or master -# - any pull request -############################################################################### -on: - push: - branches: - - 2021.02 - - 2021.09 - - main - pull_request: - branches: - - '**' - schedule: - - cron: "0 0 * * *" - workflow_dispatch: - inputs: - platform: - description: 'Arguments for the platform script:' - required: true - default: '-extent=f -parallel=p -jobs=2 -vst=y -compcert=y -set-switch=y' - -############################################################################### -# Platform script options shared among all jobs -############################################################################### -env: - PLATFORM_ARGS: -extent=f -parallel=p -jobs=2 -vst=y -compcert=y -set-switch=y - COQREGTESTING: y - -############################################################################### -# Windows -# -# 2 jobs, the former builds the installer, the second tests it -# -# CAVEATS: -# - git is misconfigured, by default it puts \r in between \n\n -############################################################################### -jobs: - Windows_platform: - name: Windows - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - architecture: - - '32' - - '64' - variant: - # Keep this in sync with the Smoke test below - - '8.15~2022.03' - - '8.14~2022.01' - - steps: - - name: Set git to use LF - run: | - git config --global core.autocrlf false - git config --global core.eol lf - - - name: Git checkout - uses: actions/checkout@v2 - - - name: Set PLATFORM - if: ${{ github.event.inputs.platform != '' }} - run: echo "PLATFORM=${{ github.event.inputs.platform }}" >> $GITHUB_ENV - - - name: Run common platform script - shell: cmd - run: coq_platform_make_windows.bat -destcyg=C:\cygwin_coq_platform -arch=${{matrix.architecture}} -packages=${{matrix.variant}} %PLATFORM_ARGS% -dumplogs - - - name: Create installer - shell: cmd - run: C:\cygwin_coq_platform\bin\bash --login -c "cd coq-platform/ && windows/create_installer_windows.sh && mkdir /cygdrive/c/installer && cp windows_installer/*exe /cygdrive/c/installer/" - - - name: Create smoke test kit - shell: cmd - run: C:\cygwin_coq_platform\bin\bash --login -c "cd coq-platform/ && shell_scripts/create_smoke_test_kit.sh && mkdir /cygdrive/c/smoke && cp -ra smoke-test-kit/* /cygdrive/c/smoke/" - - - name: 'Upload Artifact' - uses: actions/upload-artifact@v2 - with: - name: 'Windows installer ${{matrix.variant}} ${{matrix.architecture}}' - path: C:\installer\*.exe - retention-days: 5 - - - name: 'Upload smoke test kit' - uses: actions/upload-artifact@v2 - with: - name: 'Smoke Test Kit Windows ${{matrix.variant}} ${{matrix.architecture}}' - path: C:\smoke\ - retention-days: 5 - - Windows_smoke: - name: Smoke test Windows - needs: Windows_platform - runs-on: windows-latest - strategy: - fail-fast: false - matrix: - architecture: - - '32' - - '64' - variant: - - '8.15~2022.03' - - '8.14~2022.01' - - steps: - - name: 'Download Artifact' - uses: actions/download-artifact@v2 - id: download - with: - name: 'Windows installer ${{matrix.variant}} ${{matrix.architecture}}' - - - name: 'Download smoke test kit' - uses: actions/download-artifact@v2 - id: download-smoke - with: - name: 'Smoke Test Kit Windows ${{matrix.variant}} ${{matrix.architecture}}' - - - name: 'Run Installer' - shell: cmd - run: | - cd ${{steps.download.outputs.download-path}} - FOR %%f IN (*.exe) DO %%f /S /D=C:\Coq - - - name: 'Smoke coqc' - shell: cmd - run: C:\Coq\bin\coqc.exe -v - - - name: 'Run Windows smoke test kit' - shell: cmd - run: | - CD ${{steps.download-smoke.outputs.download-path}} - DIR - SET PATH=C:\Coq\bin\;%PATH% - CALL run-smoke-test.bat From 026fa909e5c8f009719641c74f8d4241e5dde24b Mon Sep 17 00:00:00 2001 From: Kartik Singhal Date: Thu, 24 Mar 2022 08:08:15 -0500 Subject: [PATCH 11/11] This is mysterious --- .github/workflows/mega-linter.yml | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/.github/workflows/mega-linter.yml b/.github/workflows/mega-linter.yml index 83b82ad6ff..6be4e2ae8c 100644 --- a/.github/workflows/mega-linter.yml +++ b/.github/workflows/mega-linter.yml @@ -27,10 +27,8 @@ jobs: # Git Checkout - name: Checkout Code uses: actions/checkout@v2 - env: - PAT: ${{ secrets.PAT_LINT_SPELL }} with: - token: ${{ secrets.PAT_LINT_SPELL || secrets.GITHUB_TOKEN }} + token: ${{ secrets.PAT_LINT_SPELL }} fetch-depth: 0 # MegaLinter @@ -43,7 +41,7 @@ jobs: # All available variables are described in documentation # https://megalinter.github.io/configuration/ VALIDATE_ALL_CODEBASE: true # Set ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} to validate only diff with main branch - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + GITHUB_TOKEN: ${{ secrets.PAT_LINT_SPELL }} # ADD YOUR CUSTOM ENV VARIABLES HERE TO OVERRIDE VALUES OF .mega-linter.yml AT THE ROOT OF YOUR REPOSITORY # Upload MegaLinter artifacts