Skip to content

Commit

Permalink
Make MinGW-w64 artifact a full installation
Browse files Browse the repository at this point in the history
  • Loading branch information
HertzDevil committed Nov 19, 2024
1 parent 4b38ff9 commit fa78b9a
Showing 1 changed file with 41 additions and 17 deletions.
58 changes: 41 additions & 17 deletions .github/workflows/mingw-w64.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,6 @@ jobs:
name: x86_64-mingw-w64-crystal-obj
path: .build/crystal.obj

- name: Upload standard library
uses: actions/upload-artifact@v4
with:
name: x86_64-mingw-w64-crystal-stdlib
path: src

x86_64-mingw-w64-link:
runs-on: windows-2022
needs: [x86_64-mingw-w64-cross-compile]
Expand All @@ -70,12 +64,6 @@ jobs:
with:
name: x86_64-mingw-w64-crystal-obj

- name: Download standard library
uses: actions/download-artifact@v4
with:
name: x86_64-mingw-w64-crystal-stdlib
path: share/crystal/src

- name: Link Crystal executable
shell: msys2 {0}
run: |
Expand All @@ -86,13 +74,49 @@ jobs:
-lole32 -lWS2_32 -Wl,--stack,0x800000
ldd bin/crystal.exe | grep -iv /c/windows/system32 | sed 's/.* => //; s/ (.*//' | xargs -t -i cp '{}' bin/
- name: Upload Crystal executable
uses: actions/upload-artifact@v4
with:
name: x86_64-mingw-w64-crystal-exe
path: bin

x86_64-mingw-w64-package:
runs-on: windows-2022
needs: [x86_64-mingw-w64-link]
steps:
- name: Setup MSYS2
id: msys2
uses: msys2/setup-msys2@ddf331adaebd714795f1042345e6ca57bd66cea8 # v2.24.1
with:
msystem: UCRT64
update: true
install: >-
make
- name: Disable CRLF line ending substitution
run: |
git config --global core.autocrlf false
- name: Download Crystal source
uses: actions/checkout@v4

- name: Download Crystal executable
uses: actions/download-artifact@v4
with:
name: x86_64-mingw-w64-crystal-exe
path: .build

- name: Package Crystal
shell: msys2 {0}
run: |
make -o .build/crystal.exe install PREFIX="$(pwd)/crystal"
cp .build/*.dll crystal/bin/
- name: Upload Crystal
uses: actions/upload-artifact@v4
with:
name: x86_64-mingw-w64-crystal
path: |
bin/
share/
path: bin

x86_64-mingw-w64-test:
runs-on: windows-2022
Expand Down Expand Up @@ -130,8 +154,8 @@ jobs:
- name: Download Crystal executable
uses: actions/download-artifact@v4
with:
name: x86_64-mingw-w64-crystal
path: crystal
name: x86_64-mingw-w64-crystal-exe
path: crystal/bin

- name: Run stdlib specs
shell: msys2 {0}
Expand Down

0 comments on commit fa78b9a

Please sign in to comment.