Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# see: https://docs.github.com/en/free-pro-team@latest/github/using-git/configuring-git-to-handle-line-endings#per-repository-settings

# Set the default behavior to use LF line endings
* text eol=lf

# Denote all files that are truly binary and should not be modified.
*.png binary
*.mvt binary
*.pbf binary
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we need at least .js, .json, and .html files to be LF line endings for tests and eslint to be happy - not sure if we should default everything to LF like this? Or selectively opt-in those file types to make the build pass.

Here are the file type counts in the repo - only png, mvt, pbf stood out as binary to me...

$ git ls-files | sed 's/^.*\././' | sort | uniq -c | sort -n
      1 .dockerfile
      1 .dockerignore
      1 .editorconfig
      1 .flow
      1 .gitattributes
      1 .gitignore
      1 .lock
      1 .mapbox-streets-v7
      1 .npmignore
      1 .satellite
      1 .sh
      1 .stylelintrc
      1 .topissuesrc
      1 .txt
      1 build/run-node
      1 build/run-tap
      1 src/style-spec/bin/gl-style-composite
      1 src/style-spec/bin/gl-style-format
      1 src/style-spec/bin/gl-style-migrate
      1 src/style-spec/bin/gl-style-validate
      2 .css
      2 .flowconfig
      2 .gitkeep
      2 .template
      2 .yml
      3 .ejs
      4 .tmpl
      5 .eslintrc
      9 .geojson
      9 .svg
     19 .md
     25 .mvt
     52 .glsl
     54 .html
    175 .pbf
    557 .js
   1312 .png
   1976 .json

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would seek advice of the Windows devs for this. Personally I would prefer the files to always stay "as-in-git" (I'm not a big fan of magic conversions on checkout/checkin), but I'm ok for the well known files to be autoconverted if Windows devs so desire. Regardless, I think we can already merge this as Windows build can be done in a separate PR.

18 changes: 12 additions & 6 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,23 +4,23 @@ name: Node.js CI

on:
push:
branches: [ foobar ] # main -- disabled until a runner with GPU is available
branches: [ main ]
pull_request:
branches: [ foobar ] # main -- disabled until a runner with GPU is available
branches: [ main ]

jobs:
build:

strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
# - macos-latest
- macos-latest
# TODO re-enable when we get windows working
# - windows-latest
node_version:
- 10
- 12
- 14
architecture:
- x64

Expand All @@ -34,4 +34,10 @@ jobs:
node-version: ${{ matrix.node_version }}
architecture: ${{ matrix.architecture }}
- run: yarn install --frozen-lockfile
- run: yarn test
- if: ${{ runner.os == 'Windows' }}
run: npm config set script-shell bash.EXE
# see: https://github.com/stackgl/headless-gl#how-can-headless-gl-be-used-on-a-headless-linux-machine
- if: ${{ runner.os == 'Linux' }}
run: xvfb-run -s "-ac -screen 0 1280x1024x24" yarn test
- if: ${{ runner.os != 'Linux' }}
run: yarn test