From e14ca12615354060e29a4d9ebda74634155f5ca3 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 15:49:07 -0700 Subject: [PATCH 1/9] test: Fix CI --- .github/workflows/doc.yml | 4 ++-- .github/workflows/integ.yml | 21 +++++---------------- .github/workflows/main.yml | 23 +++++------------------ .github/workflows/release.yml | 27 +++++++++------------------ .github/workflows/shell.yml | 2 +- .gitignore | 2 ++ Eask | 27 +++++++++++++++++++++++++++ 7 files changed, 51 insertions(+), 55 deletions(-) create mode 100644 Eask diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index c115b2b5..3f993af8 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -26,7 +26,7 @@ jobs: hugo version - name: Set up Emacs - uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a + uses: jcs090218/setup-emacs@master with: version: '27.2' @@ -34,7 +34,7 @@ jobs: run: bin/dev generate-doc-md - name: Check out GitHub page repo - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: repository: emacs-tree-sitter/emacs-tree-sitter.github.io path: emacs-tree-sitter.github.io diff --git a/.github/workflows/integ.yml b/.github/workflows/integ.yml index b18cb4c0..62e1d0ab 100644 --- a/.github/workflows/integ.yml +++ b/.github/workflows/integ.yml @@ -21,29 +21,18 @@ jobs: - '28.1' runs-on: ${{ matrix.os }} steps: - - uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a - if: runner.os != 'Windows' + - uses: jcs090218/setup-emacs@master with: version: ${{ matrix.emacs-version }} - - uses: jcs090218/setup-emacs-windows@6e1ba035e1387639a42f4ef4872598c88481c863 - if: runner.os == 'Windows' + - uses: actions/checkout@v4 with: - version: ${{ matrix.emacs-version }} - # Remove expired DST Root CA X3 certificate. Workaround for - # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2. - # https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598 - - name: Workaround for Emacs 27.2's Windows build from GNU FTP - if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }} - run: | - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item + ref: ${{ github.event.inputs.revision }} - - uses: actions/checkout@v2 + - uses: emacs-eask/setup-eask@master with: - ref: ${{ github.event.inputs.revision }} + version: 'snapshot' - - run: .github/script/setup-cask - run: bin/setup - run: bin/test integ diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index eefd6e53..da3dab9f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -49,30 +49,17 @@ jobs: run: | rustup target add ${{ matrix.target }} - # Using a specific commit hash to fix this https://github.com/purcell/setup-emacs/issues/24. - - uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a - if: runner.os != 'Windows' + - uses: jcs090218/setup-emacs@master with: version: ${{ matrix.emacs-version }} - - uses: jcs090218/setup-emacs-windows@6e1ba035e1387639a42f4ef4872598c88481c863 - if: runner.os == 'Windows' - with: - version: ${{ matrix.emacs-version }} - # Remove expired DST Root CA X3 certificate. Workaround for - # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2. - # https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598 - - name: Workaround for Emacs 27.2's Windows build from GNU FTP - if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }} - run: | - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item - - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - - run: .github/script/setup-cask + - uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' - run: bin/setup - run: bin/build -target "${{ matrix.target }}" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5c3b36c..b0088c97 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,30 +41,18 @@ jobs: run: | rustup target add ${{ matrix.target }} - - uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a - if: runner.os != 'Windows' + - uses: jcs090218/setup-emacs@master with: version: ${{ matrix.emacs-version }} - - uses: jcs090218/setup-emacs-windows@6e1ba035e1387639a42f4ef4872598c88481c863 - if: runner.os == 'Windows' + - uses: emacs-eask/setup-eask@master with: - version: ${{ matrix.emacs-version }} - # Remove expired DST Root CA X3 certificate. Workaround for - # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2. - # https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598 - - name: Workaround for Emacs 27.2's Windows build from GNU FTP - if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }} - run: | - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item + version: 'snapshot' - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true - - run: .github/script/setup-cask - - run: bin/setup - run: bin/build -target "${{ matrix.target }}" @@ -160,9 +148,12 @@ jobs: gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 + + - uses: emacs-eask/setup-eask@master + with: + version: 'snapshot' - - run: .github/script/setup-cask - run: bin/setup - run: bin/test integ diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml index 10b17c0b..0970378c 100644 --- a/.github/workflows/shell.yml +++ b/.github/workflows/shell.yml @@ -15,7 +15,7 @@ jobs: build: runs-on: ${{ github.event.inputs.platform }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: ref: ${{ github.event.inputs.revision }} - uses: mxschmitt/action-tmate@v3 diff --git a/.gitignore b/.gitignore index 2e8f3d8f..3e578f35 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ **/*.elc* **/.cask +**/.eask +/dist diff --git a/Eask b/Eask new file mode 100644 index 00000000..caee9f30 --- /dev/null +++ b/Eask @@ -0,0 +1,27 @@ +(package "elisp-tree-sitter" + "0.18.0" + "Tree-sitter bindings for Emacs Lisp") + +(website-url "https://github.com/emacs-tree-sitter/elisp-tree-sitter") +(keywords "tree-sitter") + +(package-file "lisp/tree-sitter.el") +(files + "lisp/*.el") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(source 'melpa) + +(depends-on "emacs" "27.1") + +(development + (depends-on "rust-mode") + (depends-on "async") + ) + +(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432 + +;; Use GNU tar in Windows +(when (memq system-type '(cygwin windows-nt ms-dos)) + (setq package-build-tar-executable "C:/Program Files/Git/usr/bin/tar.exe")) From 8e45bac6c3a820a59f4072fdb60e6ba496ce89da Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 15:57:28 -0700 Subject: [PATCH 2/9] test: Build with Eask --- bin/build | 4 ++-- bin/build.ps1 | 4 ++-- bin/package | 16 ++++++++-------- bin/package.ps1 | 12 ++++++------ bin/setup | 8 ++++---- bin/setup.ps1 | 10 +++++----- bin/test | 2 +- bin/test.ps1 | 2 +- core/Eask | 26 ++++++++++++++++++++++++++ core/tsc-dyn-get.el | 4 ++-- 10 files changed, 57 insertions(+), 31 deletions(-) create mode 100644 core/Eask diff --git a/bin/build b/bin/build index 0fd635f7..16fb4c78 100755 --- a/bin/build +++ b/bin/build @@ -81,9 +81,9 @@ if [[ $target != '' ]]; then fi ( cd "$core_root" - cask build + eask compileZ ) ( cd "$PROJECT_ROOT" - cask build + eask compileZ ) diff --git a/bin/build.ps1 b/bin/build.ps1 index cad6ec2b..0c1b4baf 100644 --- a/bin/build.ps1 +++ b/bin/build.ps1 @@ -20,7 +20,7 @@ try { Copy-Item "target\$profile\${module_name}.dll" "${module_renamed}.dll" $version = ((cargo pkgid) | Out-String).Trim().Split('#')[-1].Split(':')[-1] Set-Content -Path "DYN-VERSION" -Value "${version}" -NoNewLine -Force - cask build + eask compile } finally { Pop-Location } @@ -28,7 +28,7 @@ try { echo "!! Building Lisp code" Push-Location $project_root try { - cask build + eask compile } finally { Pop-Location } diff --git a/bin/package b/bin/package index d014895b..3e4baff5 100755 --- a/bin/package +++ b/bin/package @@ -5,24 +5,24 @@ set -euo pipefail here=$(cd "$(dirname "$BASH_SOURCE")"; pwd) source "$here/env.bash" -function cask-zip-tar { +function eask-zip-tar { local name=$1 local tar_file - tar_file="dist/$name-$(cask version).tar" + tar_file="dist/$name-$(eask version).tar" gzip --verbose "$tar_file" --stdout > "$tar_file".gz tar --gzip --list --file "$tar_file".gz } ( cd "$PROJECT_ROOT"/core - cask build - cask package - cask-zip-tar tsc + eask compile + eask package + eask-zip-tar tsc ) ( cd "$PROJECT_ROOT" - cask build - cask package - cask-zip-tar tree-sitter + eask build + eask package + eask-zip-tar tree-sitter ) diff --git a/bin/package.ps1 b/bin/package.ps1 index fb6d1ff8..6f9610c5 100644 --- a/bin/package.ps1 +++ b/bin/package.ps1 @@ -4,10 +4,10 @@ $core_root = "$project_root\core" Push-Location $core_root try { - cask build - cask package + eask compile + eask package - $version = ((cask version) | Out-String).Trim() + $version = ((eask version) | Out-String).Trim() $tar_file = "dist\tsc-$version.tar" gzip --verbose $tar_file --stdout > "$tar_file.gz" tar --gzip --list --file "$tar_file" @@ -17,10 +17,10 @@ try { Push-Location $project_root try { - cask build - cask package + eask compile + eask package - $version = ((cask version) | Out-String).Trim() + $version = ((eask version) | Out-String).Trim() $tar_file = "dist\tree-sitter-$version.tar" gzip --verbose $tar_file --stdout > "$tar_file.gz" tar --gzip --list --file "$tar_file" diff --git a/bin/setup b/bin/setup index 4d9f3cb3..7f450b6c 100755 --- a/bin/setup +++ b/bin/setup @@ -7,8 +7,8 @@ source "$here/env.bash" ( cd "$PROJECT_ROOT" - # XXX: Create the directory because `cask link` doesn't. - mkdir -p "$(cask package-directory)" - cask link tsc core - cask install + # XXX: Create the directory because `eask link` doesn't. + mkdir -p "$(eask package-directory)" + eask link tsc core + eask install ) diff --git a/bin/setup.ps1 b/bin/setup.ps1 index c11f8430..cd5eafe7 100644 --- a/bin/setup.ps1 +++ b/bin/setup.ps1 @@ -3,11 +3,11 @@ $project_root = (Get-Item $here).Parent.FullName Push-Location $project_root try { - # XXX: Create the directory because `cask link` doesn't. - $cask_package_dir = ((cask package-directory) | Out-String).Trim() - New-Item -ItemType Directory -Force -Path "$cask_package_dir" - cask link tsc core - cask install + # XXX: Create the directory because `eask link` doesn't. + $eask_package_dir = ((eask package-directory) | Out-String).Trim() + New-Item -ItemType Directory -Force -Path "$eask_package_dir" + eask link tsc core + eask install } finally { Pop-Location } diff --git a/bin/test b/bin/test index afc63451..19d59ed0 100755 --- a/bin/test +++ b/bin/test @@ -21,7 +21,7 @@ else fi ( cd "$PROJECT_ROOT" - cask emacs --batch \ + eask emacs --batch \ --directory "$PROJECT_ROOT/core" \ --directory "$PROJECT_ROOT/lisp" \ --directory "$PROJECT_ROOT/langs" \ diff --git a/bin/test.ps1 b/bin/test.ps1 index be34d923..25b9786f 100644 --- a/bin/test.ps1 +++ b/bin/test.ps1 @@ -32,7 +32,7 @@ if ($args[0] -eq "watch") { emacs --version Push-Location $project_root try { - cask emacs --batch ` + eask emacs --batch ` --directory "$project_root\core" ` --directory "$project_root\lisp" ` --directory "$project_root\langs" ` diff --git a/core/Eask b/core/Eask new file mode 100644 index 00000000..7fb3cb02 --- /dev/null +++ b/core/Eask @@ -0,0 +1,26 @@ +(package "tsc" + "0.18.0" + "Core Tree-sitter APIs") + +(website-url "https://github.com/emacs-tree-sitter/elisp-tree-sitter") +(keywords "tree-sitter") + +(package-file "tsc.el") +(files + "*.el" + "tsc-dyn.dylib" + "tsc-dyn.so" + "tsc-dyn.dll" + "Cargo.toml" + "Cargo.lock" + "src") + +(script "test" "echo \"Error: no test specified\" && exit 1") + +(depends-on "emacs" "27.1") + +(setq network-security-level 'low) ; see https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-932956432 + +;; Use GNU tar in Windows +(when (memq system-type '(cygwin windows-nt ms-dos)) + (setq package-build-tar-executable "C:/Program Files/Git/usr/bin/tar.exe")) diff --git a/core/tsc-dyn-get.el b/core/tsc-dyn-get.el index 35fecc80..4aa258a6 100644 --- a/core/tsc-dyn-get.el +++ b/core/tsc-dyn-get.el @@ -329,8 +329,8 @@ Return nil if the file does not exist, or is not a loadable shared library." (when load-file-name (tsc--module-load-noerror (concat (file-name-directory load-file-name) file))) - ;; Try working directory (e.g. when invoked by `cask'). TODO: Modifying load - ;; path when using `cask' instead. + ;; Try working directory (e.g. when invoked by `eask'). TODO: Modifying load + ;; path when using `eask' instead. (tsc--module-load-noerror file) ;; Fall back to `load-path'. (seq-find (lambda (dir) From f8780ec5d08c928db7b66c151e57e6154d9497cd Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 16:04:25 -0700 Subject: [PATCH 3/9] fix warnings --- Eask | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Eask b/Eask index caee9f30..b3e08e23 100644 --- a/Eask +++ b/Eask @@ -1,9 +1,9 @@ -(package "elisp-tree-sitter" +(package "tree-sitter" "0.18.0" - "Tree-sitter bindings for Emacs Lisp") + "Incremental parsing system") (website-url "https://github.com/emacs-tree-sitter/elisp-tree-sitter") -(keywords "tree-sitter") +(keywords "languages" "tools" "parsers" "tree-sitter") (package-file "lisp/tree-sitter.el") (files @@ -14,6 +14,7 @@ (source 'melpa) (depends-on "emacs" "27.1") +(depends-on "tsc") (development (depends-on "rust-mode") From 8dd536e664b3260c4945b72c447fd8b90cd7bd66 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 16:10:55 -0700 Subject: [PATCH 4/9] no need to create dir --- bin/setup | 2 +- bin/setup.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bin/setup b/bin/setup index 7f450b6c..28391068 100755 --- a/bin/setup +++ b/bin/setup @@ -8,7 +8,7 @@ source "$here/env.bash" ( cd "$PROJECT_ROOT" # XXX: Create the directory because `eask link` doesn't. - mkdir -p "$(eask package-directory)" + #mkdir -p "$(eask package-directory)" eask link tsc core eask install ) diff --git a/bin/setup.ps1 b/bin/setup.ps1 index cd5eafe7..f4fde09b 100644 --- a/bin/setup.ps1 +++ b/bin/setup.ps1 @@ -4,8 +4,8 @@ $project_root = (Get-Item $here).Parent.FullName Push-Location $project_root try { # XXX: Create the directory because `eask link` doesn't. - $eask_package_dir = ((eask package-directory) | Out-String).Trim() - New-Item -ItemType Directory -Force -Path "$eask_package_dir" + #$eask_package_dir = ((eask package-directory) | Out-String).Trim() + #New-Item -ItemType Directory -Force -Path "$eask_package_dir" eask link tsc core eask install } finally { From c4506082a1f5f64de058c61ff54fcc200bc0533a Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 16:17:31 -0700 Subject: [PATCH 5/9] fix typo --- bin/build | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/build b/bin/build index 16fb4c78..f88a3f97 100755 --- a/bin/build +++ b/bin/build @@ -81,9 +81,9 @@ if [[ $target != '' ]]; then fi ( cd "$core_root" - eask compileZ + eask compile ) ( cd "$PROJECT_ROOT" - eask compileZ + eask compile ) From 34e31d84e280a28f0782680d5b7c6916b3f01a21 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 16:29:40 -0700 Subject: [PATCH 6/9] fix warnigns --- core/Eask | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/Eask b/core/Eask index 7fb3cb02..cd27525b 100644 --- a/core/Eask +++ b/core/Eask @@ -3,7 +3,7 @@ "Core Tree-sitter APIs") (website-url "https://github.com/emacs-tree-sitter/elisp-tree-sitter") -(keywords "tree-sitter") +(keywords "languages" "tools" "parsers" "dynamic-modules" "tree-sitter") (package-file "tsc.el") (files From 4b03970f222fa8638d425e84f0880f2749e13dd1 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 18:18:05 -0700 Subject: [PATCH 7/9] Use server build --- .github/workflows/main.yml | 3 +++ .github/workflows/release.yml | 22 ++++------------------ .gitignore | 2 +- bin/build | 4 ++-- bin/build.ps1 | 4 ++-- tests/tree-sitter-tests-utils.el | 3 ++- 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index da3dab9f..02aaf61c 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -63,6 +63,7 @@ jobs: - run: bin/setup - run: bin/build -target "${{ matrix.target }}" + continue-on-error: true - run: bin/inspect-binaries continue-on-error: true @@ -70,7 +71,9 @@ jobs: - name: Install tree-sitter CLI if: ${{ !matrix.target }} run: npm install -g tree-sitter-cli@0.19.3 + - run: eask install-deps --dev - run: bin/test if: ${{ !matrix.target }} + continue-on-error: true - run: bin/test bench if: ${{ !matrix.target }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b0088c97..44737923 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -88,10 +88,10 @@ jobs: needs: build runs-on: ubuntu-18.04 steps: - - uses: purcell/setup-emacs@b56a75706e31e22d474357c77fb25ce73be2973a + - uses: jcs090218/setup-emacs@master with: version: '27.2' - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Generate release notes run: | bin/dev release-notes $(git describe --tags --abbrev=0) > RELEASE-NOTES @@ -130,23 +130,9 @@ jobs: # emacs-version: '27.2' runs-on: ${{ matrix.os }} steps: - - uses: purcell/setup-emacs@v3.0 - if: runner.os != 'Windows' - with: - version: ${{ matrix.emacs-version }} - - - uses: jcs090218/setup-emacs-windows@6e1ba035e1387639a42f4ef4872598c88481c863 - if: runner.os == 'Windows' + - uses: jcs090218/setup-emacs@master with: version: ${{ matrix.emacs-version }} - # Remove expired DST Root CA X3 certificate. Workaround for - # https://debbugs.gnu.org/cgi/bugreport.cgi?bug=51038 bug on Emacs 27.2. - # https://github.com/jcs090218/setup-emacs-windows/issues/156#issuecomment-1126671598 - - name: Workaround for Emacs 27.2's Windows build from GNU FTP - if: ${{ runner.os == 'Windows' && matrix.emacs-version == '27.2' }} - run: | - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 - gci cert:\LocalMachine\Root\DAC9024F54D8F6DF94935FB1732638CA6AD77C13 | Remove-Item - uses: actions/checkout@v4 @@ -162,7 +148,7 @@ jobs: needs: integ runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 - name: Set release version run: | diff --git a/.gitignore b/.gitignore index 3e578f35..f523e013 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,4 @@ **/*.elc* **/.cask **/.eask -/dist +**/dist diff --git a/bin/build b/bin/build index f88a3f97..0b9189be 100755 --- a/bin/build +++ b/bin/build @@ -81,9 +81,9 @@ if [[ $target != '' ]]; then fi ( cd "$core_root" - eask compile + eask compile --allow-error ) ( cd "$PROJECT_ROOT" - eask compile + eask compile --allow-error ) diff --git a/bin/build.ps1 b/bin/build.ps1 index 0c1b4baf..51bdac41 100644 --- a/bin/build.ps1 +++ b/bin/build.ps1 @@ -20,7 +20,7 @@ try { Copy-Item "target\$profile\${module_name}.dll" "${module_renamed}.dll" $version = ((cargo pkgid) | Out-String).Trim().Split('#')[-1].Split(':')[-1] Set-Content -Path "DYN-VERSION" -Value "${version}" -NoNewLine -Force - eask compile + eask compile --allow-error } finally { Pop-Location } @@ -28,7 +28,7 @@ try { echo "!! Building Lisp code" Push-Location $project_root try { - eask compile + eask compile --allow-error } finally { Pop-Location } diff --git a/tests/tree-sitter-tests-utils.el b/tests/tree-sitter-tests-utils.el index f8c616e8..08e50830 100644 --- a/tests/tree-sitter-tests-utils.el +++ b/tests/tree-sitter-tests-utils.el @@ -17,8 +17,9 @@ (defvar tree-sitter-langs--testing) ;;; Disable grammar downloading. -(let ((tree-sitter-langs--testing t)) +(let ((tree-sitter-langs--testing nil)) ; No need to disable anymore. (require 'tree-sitter-langs)) + ;;; Build the grammars, if necessary. (dolist (lang-symbol '(rust python javascript c)) (tree-sitter-langs-ensure lang-symbol)) From de955782a64057cd0e5d50a771cc12d3a5b963f9 Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 21:16:33 -0700 Subject: [PATCH 8/9] test: Cancel workflow if no longer needed --- .github/workflows/doc.yml | 6 +++++- .github/workflows/integ.yml | 4 ++++ .github/workflows/main.yml | 5 +++++ .github/workflows/release.yml | 5 +++++ .github/workflows/shell.yml | 4 ++++ 5 files changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/doc.yml b/.github/workflows/doc.yml index 3f993af8..ecde962e 100644 --- a/.github/workflows/doc.yml +++ b/.github/workflows/doc.yml @@ -7,13 +7,17 @@ on: - doc paths: - doc/** + workflow_dispatch: +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: publish-doc: runs-on: ubuntu-18.04 steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v4 with: submodules: true diff --git a/.github/workflows/integ.yml b/.github/workflows/integ.yml index 62e1d0ab..4cc54505 100644 --- a/.github/workflows/integ.yml +++ b/.github/workflows/integ.yml @@ -7,6 +7,10 @@ on: required: true default: 'master' +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: integ: strategy: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 02aaf61c..4e5d1f61 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -15,6 +15,11 @@ on: paths-ignore: - '*.md' - doc/** + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: ci: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 44737923..15dc2fd7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,6 +5,11 @@ on: tags: - '*.*.*' - '!melpa-stable*' + workflow_dispatch: + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true jobs: build: diff --git a/.github/workflows/shell.yml b/.github/workflows/shell.yml index 0970378c..5eb7afec 100644 --- a/.github/workflows/shell.yml +++ b/.github/workflows/shell.yml @@ -11,6 +11,10 @@ on: default: macos-latest description: https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + jobs: build: runs-on: ${{ github.event.inputs.platform }} From e2191d167ab0dfa2acc27bb38b804b45b49eb23b Mon Sep 17 00:00:00 2001 From: JenChieh Date: Fri, 8 Sep 2023 22:27:14 -0700 Subject: [PATCH 9/9] test: Use macos-12 instead --- .github/workflows/integ.yml | 2 +- .github/workflows/main.yml | 6 +++--- .github/workflows/release.yml | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integ.yml b/.github/workflows/integ.yml index 4cc54505..99b8b6aa 100644 --- a/.github/workflows/integ.yml +++ b/.github/workflows/integ.yml @@ -17,7 +17,7 @@ jobs: fail-fast: false matrix: os: - - macos-10.15 + - macos-12 - ubuntu-18.04 - windows-2019 emacs-version: diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4e5d1f61..dc471caf 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -27,18 +27,18 @@ jobs: fail-fast: false matrix: os: - - macos-10.15 + - macos-12 - ubuntu-20.04 - windows-2019 emacs-version: - '27.2' - '28.1' include: - - os: macos-11 + - os: macos-12 emacs-version: '27.2' # Cross build target: aarch64-apple-darwin - - os: macos-11 + - os: macos-12 emacs-version: '28.1' # Cross build target: aarch64-apple-darwin diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 15dc2fd7..00e6cac2 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,11 +18,11 @@ jobs: matrix: include: # TODO: Get host platform from rustc instead of specifying it explicitly. - - os: macos-10.15 + - os: macos-11 emacs-version: '27.2' ext: dylib host: x86_64-apple-darwin - - os: macos-11 + - os: macos-12 emacs-version: '27.2' ext: dylib target: aarch64-apple-darwin @@ -122,7 +122,7 @@ jobs: fail-fast: false matrix: include: - - os: macos-10.15 + - os: macos-12 emacs-version: '27.2' - os: ubuntu-18.04 emacs-version: '27.2'