Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change some line endings from CRLF to LF #14299

Merged
merged 2 commits into from
Feb 21, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
60 changes: 30 additions & 30 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
## Sources
*.cr text eol=lf
## Sourced-in dependencies
lib/** linguist-vendored
## Generated files
# produced by scripts/generate_windows_zone_names.cr
src/crystal/system/win32/zone_names.cr linguist-generated
# produced by scripts/generate_html_entities.cr
src/html/entities.cr linguist-generated
# produced by scripts/generate_ssl_server_defaults.cr
src/openssl/ssl/defaults.cr linguist-generated
# produced by scripts/generate_grapheme_properties.cr
src/string/grapheme/properties.cr linguist-generated
# produced by scripts/generate_unicode_data.cr
src/unicode/data.cr linguist-generated
# produced by spec/generate_interpreter_spec.sh
spec/interpreter_std_spec.cr linguist-generated
# produced by scripts/generate_grapheme_break_specs.cr
spec/std/string/grapheme_break_spec.cr linguist-generated
# produced by spec/generate_wasm32_spec.sh
spec/wasm32_std_spec.cr linguist-generated
## Syntax highlighting
Makefile.win linguist-language=makefile
## Sources

*.cr text eol=lf

## Sourced-in dependencies

lib/** linguist-vendored

## Generated files

# produced by scripts/generate_windows_zone_names.cr
src/crystal/system/win32/zone_names.cr linguist-generated
# produced by scripts/generate_html_entities.cr
src/html/entities.cr linguist-generated
# produced by scripts/generate_ssl_server_defaults.cr
src/openssl/ssl/defaults.cr linguist-generated
# produced by scripts/generate_grapheme_properties.cr
src/string/grapheme/properties.cr linguist-generated
# produced by scripts/generate_unicode_data.cr
src/unicode/data.cr linguist-generated
# produced by spec/generate_interpreter_spec.sh
spec/interpreter_std_spec.cr linguist-generated
# produced by scripts/generate_grapheme_break_specs.cr
spec/std/string/grapheme_break_spec.cr linguist-generated
# produced by spec/generate_wasm32_spec.sh
spec/wasm32_std_spec.cr linguist-generated

## Syntax highlighting

Makefile.win linguist-language=makefile
300 changes: 150 additions & 150 deletions .github/workflows/win_build_portable.yml
Original file line number Diff line number Diff line change
@@ -1,150 +1,150 @@
name: Windows CI / Build Portable Package
on:
workflow_call:
inputs:
release:
required: true
type: boolean
llvm_version:
required: true
type: string
jobs:
build:
runs-on: windows-2022
steps:
- name: Disable CRLF line ending substitution
run: |
git config --global core.autocrlf false
- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: "1.11.2"
- name: Download Crystal source
uses: actions/checkout@v4
- name: Restore libraries
uses: actions/cache/restore@v4
with:
path: |
libs/pcre.lib
libs/pcre2-8.lib
libs/iconv.lib
libs/gc.lib
libs/ffi.lib
libs/z.lib
libs/mpir.lib
libs/yaml.lib
libs/xml2.lib
key: win-libs-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore OpenSSL
uses: actions/cache/restore@v4
with:
path: |
libs/crypto.lib
libs/ssl.lib
libs/openssl_VERSION
key: win-openssl-libs-3.1.0-${{ hashFiles('etc/win-ci/build-openssl.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore DLLs
uses: actions/cache/restore@v4
with:
path: |
libs/pcre-dynamic.lib
libs/pcre2-8-dynamic.lib
libs/iconv-dynamic.lib
libs/gc-dynamic.lib
libs/ffi-dynamic.lib
libs/z-dynamic.lib
libs/mpir-dynamic.lib
libs/yaml-dynamic.lib
libs/xml2-dynamic.lib
dlls/pcre.dll
dlls/pcre2-8.dll
dlls/libiconv.dll
dlls/gc.dll
dlls/libffi.dll
dlls/zlib1.dll
dlls/mpir.dll
dlls/yaml.dll
dlls/libxml2.dll
key: win-dlls-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore OpenSSL DLLs
uses: actions/cache/restore@v4
with:
path: |
libs/crypto-dynamic.lib
libs/ssl-dynamic.lib
dlls/libcrypto-3-x64.dll
dlls/libssl-3-x64.dll
key: win-openssl-dlls-3.1.0-${{ hashFiles('etc/win-ci/build-openssl.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore LLVM
uses: actions/cache/restore@v4
with:
path: llvm
key: llvm-libs-${{ inputs.llvm_version }}-msvc
fail-on-cache-miss: true
- name: Restore LLVM DLLs
uses: actions/cache/restore@v4
with:
path: |
libs/llvm_VERSION
libs/llvm-dynamic.lib
dlls/LLVM-C.dll
key: llvm-dlls-${{ inputs.llvm_version }}-${{ hashFiles('etc/win-ci/build-llvm.ps1') }}-msvc
fail-on-cache-miss: true
- name: Set up environment
run: |
echo "CRYSTAL_LIBRARY_PATH=$(pwd)\libs" >> ${env:GITHUB_ENV}
echo "LLVM_CONFIG=$(pwd)\llvm\bin\llvm-config.exe" >> ${env:GITHUB_ENV}
- name: Build LLVM extensions
run: make -f Makefile.win deps
- name: Build Crystal
run: |
bin/crystal.bat env
make -f Makefile.win -B ${{ inputs.release && 'release=1' || '' }}
- name: Download shards release
uses: actions/checkout@v4
with:
repository: crystal-lang/shards
ref: v0.17.4
path: shards
- name: Download molinillo release
uses: actions/checkout@v4
with:
repository: crystal-lang/crystal-molinillo
ref: v0.2.0
path: shards/lib/molinillo
- name: Build shards release
working-directory: ./shards
run: ../bin/crystal.bat build ${{ inputs.release && '--release' || '' }} src/shards.cr
- name: Gather Crystal binaries
run: |
make -f Makefile.win install prefix=crystal
mkdir crystal/lib
cp shards/shards.exe crystal/
cp libs/* crystal/lib/
cp dlls/* crystal/
cp README.md crystal/
- name: Upload Crystal binaries
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.release && 'crystal-release' || 'crystal' }}
path: crystal
name: Windows CI / Build Portable Package

on:
workflow_call:
inputs:
release:
required: true
type: boolean
llvm_version:
required: true
type: string

jobs:
build:
runs-on: windows-2022
steps:
- name: Disable CRLF line ending substitution
run: |
git config --global core.autocrlf false

- name: Enable Developer Command Prompt
uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0

- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: "1.11.2"

- name: Download Crystal source
uses: actions/checkout@v4

- name: Restore libraries
uses: actions/cache/restore@v4
with:
path: |
libs/pcre.lib
libs/pcre2-8.lib
libs/iconv.lib
libs/gc.lib
libs/ffi.lib
libs/z.lib
libs/mpir.lib
libs/yaml.lib
libs/xml2.lib
key: win-libs-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore OpenSSL
uses: actions/cache/restore@v4
with:
path: |
libs/crypto.lib
libs/ssl.lib
libs/openssl_VERSION
key: win-openssl-libs-3.1.0-${{ hashFiles('etc/win-ci/build-openssl.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore DLLs
uses: actions/cache/restore@v4
with:
path: |
libs/pcre-dynamic.lib
libs/pcre2-8-dynamic.lib
libs/iconv-dynamic.lib
libs/gc-dynamic.lib
libs/ffi-dynamic.lib
libs/z-dynamic.lib
libs/mpir-dynamic.lib
libs/yaml-dynamic.lib
libs/xml2-dynamic.lib
dlls/pcre.dll
dlls/pcre2-8.dll
dlls/libiconv.dll
dlls/gc.dll
dlls/libffi.dll
dlls/zlib1.dll
dlls/mpir.dll
dlls/yaml.dll
dlls/libxml2.dll
key: win-dlls-${{ hashFiles('.github/workflows/win.yml', 'etc/win-ci/*.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore OpenSSL DLLs
uses: actions/cache/restore@v4
with:
path: |
libs/crypto-dynamic.lib
libs/ssl-dynamic.lib
dlls/libcrypto-3-x64.dll
dlls/libssl-3-x64.dll
key: win-openssl-dlls-3.1.0-${{ hashFiles('etc/win-ci/build-openssl.ps1') }}-msvc
fail-on-cache-miss: true
- name: Restore LLVM
uses: actions/cache/restore@v4
with:
path: llvm
key: llvm-libs-${{ inputs.llvm_version }}-msvc
fail-on-cache-miss: true
- name: Restore LLVM DLLs
uses: actions/cache/restore@v4
with:
path: |
libs/llvm_VERSION
libs/llvm-dynamic.lib
dlls/LLVM-C.dll
key: llvm-dlls-${{ inputs.llvm_version }}-${{ hashFiles('etc/win-ci/build-llvm.ps1') }}-msvc
fail-on-cache-miss: true

- name: Set up environment
run: |
echo "CRYSTAL_LIBRARY_PATH=$(pwd)\libs" >> ${env:GITHUB_ENV}
echo "LLVM_CONFIG=$(pwd)\llvm\bin\llvm-config.exe" >> ${env:GITHUB_ENV}

- name: Build LLVM extensions
run: make -f Makefile.win deps

- name: Build Crystal
run: |
bin/crystal.bat env
make -f Makefile.win -B ${{ inputs.release && 'release=1' || '' }}

- name: Download shards release
uses: actions/checkout@v4
with:
repository: crystal-lang/shards
ref: v0.17.4
path: shards

- name: Download molinillo release
uses: actions/checkout@v4
with:
repository: crystal-lang/crystal-molinillo
ref: v0.2.0
path: shards/lib/molinillo

- name: Build shards release
working-directory: ./shards
run: ../bin/crystal.bat build ${{ inputs.release && '--release' || '' }} src/shards.cr

- name: Gather Crystal binaries
run: |
make -f Makefile.win install prefix=crystal
mkdir crystal/lib
cp shards/shards.exe crystal/
cp libs/* crystal/lib/
cp dlls/* crystal/
cp README.md crystal/

- name: Upload Crystal binaries
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.release && 'crystal-release' || 'crystal' }}
path: crystal
14 changes: 7 additions & 7 deletions spec/compiler/data/visibility.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define LOCAL
#else
#define EXPORT __attribute__ ((visibility ("default")))
#define LOCAL __attribute__ ((visibility ("hidden")))
#endif
#ifdef _WIN32
#define EXPORT __declspec(dllexport)
#define LOCAL
#else
#define EXPORT __attribute__ ((visibility ("default")))
#define LOCAL __attribute__ ((visibility ("hidden")))
#endif
Loading