diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 23a018e89cd..a77ad2dd19a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,6 +69,13 @@ jobs: - run: npx hereby native-preview:release --forRelease --setPrerelease dev.0.0 + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 + with: + name: release-build + path: | + built/npm/*.tgz + built/vsix/*.vsix + extension: runs-on: ubuntu-latest steps: diff --git a/Herebyfile.mjs b/Herebyfile.mjs index 5143cfe8692..2fad4358c8c 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -1522,6 +1522,7 @@ const platforms = [ { os: "darwin", arch: "x64", vsix: true, cert: "MacDeveloperHarden" }, { os: "darwin", arch: "arm64", vsix: true, cert: "MacDeveloperHarden" }, { os: "aix", arch: "ppc64" }, + { os: "android", arch: "arm64" }, { os: "freebsd", arch: "arm64" }, { os: "freebsd", arch: "x64" }, { os: "linux", arch: "loong64" }, @@ -1541,7 +1542,6 @@ const ignoredGoTargets = new Map([ ["android/386", "Android is not a Node runtime target TypeScript supports"], ["android/amd64", "Android is not a Node runtime target TypeScript supports"], ["android/arm", "Android is not a Node runtime target TypeScript supports"], - ["android/arm64", "Android is not a Node runtime target TypeScript supports"], ["freebsd/386", "FreeBSD is experimental in Node and limited here to mainstream 64-bit x64/arm64"], ["freebsd/arm", "FreeBSD is experimental in Node and limited here to mainstream 64-bit x64/arm64"], ["linux/386", "ia32 means 32-bit x86, which TypeScript does not support for native packages"], @@ -1609,7 +1609,7 @@ const getPlatforms = memoize(() => { const publishTag = getPublishTag(); let supportedPlatforms = publishAsTypescript && publishTag !== "next" ? platforms - : platforms.filter(({ vsix }) => vsix); + : platforms.filter(({ os, vsix }) => vsix || os === "android"); if (!options.forRelease) { supportedPlatforms = supportedPlatforms.filter(({ os, arch }) => os === process.platform && arch === process.arch); diff --git a/internal/fswatch/fanotify_linux.go b/internal/fswatch/fanotify_linux.go index 82fe3eb8062..d77b9c0484d 100644 --- a/internal/fswatch/fanotify_linux.go +++ b/internal/fswatch/fanotify_linux.go @@ -6,6 +6,7 @@ import ( "encoding/binary" "errors" "fmt" + "runtime" "sync/atomic" "unsafe" @@ -187,6 +188,9 @@ func init() { // fanotifyAvailable probes whether fanotify_init succeeds with the flags // this backend needs. func fanotifyAvailable() bool { + if runtime.GOOS == "android" { + return false + } fd, err := unix.FanotifyInit(fanotifyInitFlags, unix.O_RDONLY|unix.O_CLOEXEC) if err != nil { return false diff --git a/internal/fswatch/watcher.go b/internal/fswatch/watcher.go index d27cadaaf20..1a918e62ea9 100644 --- a/internal/fswatch/watcher.go +++ b/internal/fswatch/watcher.go @@ -186,7 +186,7 @@ func AllWatchers() []Watcher { } } -// Inotify returns the inotify watcher (Linux). +// Inotify returns the inotify watcher (Linux and Android). func Inotify() Watcher { return inotifyWatcher } // FSEvents returns the FSEvents watcher (macOS). @@ -209,6 +209,8 @@ func Default() Watcher { return Fanotify() } return Inotify() + case "android": + return Inotify() case "darwin": if FSEvents().Available() { return FSEvents() diff --git a/internal/fswatch/watcher_test.go b/internal/fswatch/watcher_test.go index 4ec78ca2615..577c6acb2f4 100644 --- a/internal/fswatch/watcher_test.go +++ b/internal/fswatch/watcher_test.go @@ -2214,6 +2214,8 @@ func TestDefaultBackendMatchesPlatform(t *testing.T) { } else { wantName = "inotify" } + case "android": + wantName = "inotify" case "darwin": wantName = "fsevents" case "windows":