|
7 | 7 |
|
8 | 8 | jobs:
|
9 | 9 |
|
10 |
| - linux: |
11 |
| - runs-on: ubuntu-20.04 |
12 |
| - steps: |
13 |
| - - name: "Install dependencies" |
14 |
| - run: | |
15 |
| - sudo apt update -y |
16 |
| - sudo apt install -y libsdl2-dev libsdl2-image-dev |
17 |
| -
|
18 |
| - - name: "Checkout sources" |
19 |
| - uses: actions/checkout@v3 |
20 |
| - |
21 |
| - - name: "Compile" |
22 |
| - run: | |
23 |
| - make bin/brogue |
24 |
| -
|
25 |
| - - name: "Create artifact" |
26 |
| - run: | |
27 |
| - make BrogueCE-linux |
28 |
| - tar -czvf BrogueCE-linux-x86_64.tar.gz BrogueCE-linux |
29 |
| -
|
30 |
| - - name: "Upload artifact" |
31 |
| - uses: actions/upload-artifact@v4 |
32 |
| - with: |
33 |
| - name: linux-x86_64 |
34 |
| - path: BrogueCE-linux-x86_64.tar.gz |
35 |
| - compression-level: 0 # There's no point compressing something already compressed |
36 |
| - |
37 |
| - macos: |
38 |
| - runs-on: macos-13 |
39 |
| - steps: |
40 |
| - - name: "Checkout sources" |
41 |
| - uses: actions/checkout@v3 |
42 |
| - |
43 |
| - - name: "Prepare" |
44 |
| - run: | |
45 |
| - make macos/sdl2.rb |
46 |
| -
|
47 |
| - - name: "Cache SDL2" |
48 |
| - uses: actions/cache@v3 |
49 |
| - with: |
50 |
| - path: sdl2-cellar |
51 |
| - key: sdl2-${{hashFiles('macos/sdl2.rb')}} |
52 |
| - |
53 |
| - - name: "Compile and install dependencies" |
54 |
| - run: | |
55 |
| - if [ -d sdl2-cellar ]; then |
56 |
| - cp -r sdl2-cellar $(brew --cellar)/sdl2 |
57 |
| - brew link sdl2 |
58 |
| - else |
59 |
| - brew install --build-from-source ./macos/sdl2.rb |
60 |
| - cp -r $(brew --cellar)/sdl2 sdl2-cellar |
61 |
| - fi |
62 |
| - brew install sdl2_image dylibbundler |
63 |
| -
|
64 |
| - - name: "Compile" |
65 |
| - run: | |
66 |
| - make MAC_APP=YES Brogue.app |
67 |
| - env: |
68 |
| - MACOSX_DEPLOYMENT_TARGET: "10.7" |
69 |
| - |
70 |
| - - name: "Fix and bundle dylib references" |
71 |
| - run: | |
72 |
| - cd Brogue.app/Contents && dylibbundler -cd -b -x MacOS/brogue |
73 |
| -
|
74 |
| - - name: "Create artifact" |
75 |
| - run: | |
76 |
| - make BrogueCE-macos |
77 |
| - zip -rll BrogueCE-macos-x86_64.zip BrogueCE-macos |
78 |
| -
|
79 |
| - - name: "Upload artifact" |
80 |
| - uses: actions/upload-artifact@v4 |
81 |
| - with: |
82 |
| - name: macos-x86_64 |
83 |
| - path: BrogueCE-macos-x86_64.zip |
84 |
| - compression-level: 0 # There's no point compressing something already compressed |
| 10 | + # linux: |
| 11 | + # runs-on: ubuntu-20.04 |
| 12 | + # steps: |
| 13 | + # - name: "Install dependencies" |
| 14 | + # run: | |
| 15 | + # sudo apt update -y |
| 16 | + # sudo apt install -y libsdl2-dev libsdl2-image-dev |
| 17 | + |
| 18 | + # - name: "Checkout sources" |
| 19 | + # uses: actions/checkout@v3 |
| 20 | + |
| 21 | + # - name: "Compile" |
| 22 | + # run: | |
| 23 | + # make bin/brogue |
| 24 | + |
| 25 | + # - name: "Create artifact" |
| 26 | + # run: | |
| 27 | + # make BrogueCE-linux |
| 28 | + # tar -czvf BrogueCE-linux-x86_64.tar.gz BrogueCE-linux |
| 29 | + |
| 30 | + # - name: "Upload artifact" |
| 31 | + # uses: actions/upload-artifact@v4 |
| 32 | + # with: |
| 33 | + # name: linux-x86_64 |
| 34 | + # path: BrogueCE-linux-x86_64.tar.gz |
| 35 | + # compression-level: 0 # There's no point compressing something already compressed |
| 36 | + |
| 37 | + # macos: |
| 38 | + # runs-on: macos-13 |
| 39 | + # steps: |
| 40 | + # - name: "Checkout sources" |
| 41 | + # uses: actions/checkout@v3 |
| 42 | + |
| 43 | + # - name: "Prepare" |
| 44 | + # run: | |
| 45 | + # make macos/sdl2.rb |
| 46 | + |
| 47 | + # - name: "Cache SDL2" |
| 48 | + # uses: actions/cache@v3 |
| 49 | + # with: |
| 50 | + # path: sdl2-cellar |
| 51 | + # key: sdl2-${{hashFiles('macos/sdl2.rb')}} |
| 52 | + |
| 53 | + # - name: "Compile and install dependencies" |
| 54 | + # run: | |
| 55 | + # if [ -d sdl2-cellar ]; then |
| 56 | + # cp -r sdl2-cellar $(brew --cellar)/sdl2 |
| 57 | + # brew link sdl2 |
| 58 | + # else |
| 59 | + # brew install --build-from-source ./macos/sdl2.rb |
| 60 | + # cp -r $(brew --cellar)/sdl2 sdl2-cellar |
| 61 | + # fi |
| 62 | + # brew install sdl2_image dylibbundler |
| 63 | + |
| 64 | + # - name: "Compile" |
| 65 | + # run: | |
| 66 | + # make MAC_APP=YES Brogue.app |
| 67 | + # env: |
| 68 | + # MACOSX_DEPLOYMENT_TARGET: "10.7" |
| 69 | + |
| 70 | + # - name: "Fix and bundle dylib references" |
| 71 | + # run: | |
| 72 | + # cd Brogue.app/Contents && dylibbundler -cd -b -x MacOS/brogue |
| 73 | + |
| 74 | + # - name: "Create artifact" |
| 75 | + # run: | |
| 76 | + # make BrogueCE-macos |
| 77 | + # zip -rll BrogueCE-macos-x86_64.zip BrogueCE-macos |
| 78 | + |
| 79 | + # - name: "Upload artifact" |
| 80 | + # uses: actions/upload-artifact@v4 |
| 81 | + # with: |
| 82 | + # name: macos-x86_64 |
| 83 | + # path: BrogueCE-macos-x86_64.zip |
| 84 | + # compression-level: 0 # There's no point compressing something already compressed |
85 | 85 |
|
86 | 86 | windows:
|
87 | 87 | runs-on: windows-latest
|
88 | 88 | steps:
|
89 | 89 | - name: "Checkout sources"
|
90 | 90 | uses: actions/checkout@v3
|
91 | 91 |
|
92 |
| - - name: "Install dependencies" |
93 |
| - run: | |
94 |
| - .\.github\get-deps-mingw.ps1 |
| 92 | + - name: "Install MSYS2 and packages" |
| 93 | + uses: msys2/setup-msys2@v2 |
| 94 | + with: |
| 95 | + msystem: MINGW64 |
| 96 | + release: false |
| 97 | + install: "make diffutils mingw-w64-x86_64-gcc mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image" |
95 | 98 |
|
96 | 99 | - name: "Compile"
|
97 |
| - shell: powershell |
| 100 | + shell: "msys2 {0}" |
98 | 101 | run: |
|
99 |
| - $env:path = $env:path + ";" + (Join-Path $pwd.Drive.Root "opt/local/x86_64-w64-mingw32/bin") |
100 |
| - $env:path = $env:path + ';C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64' |
101 |
| - mingw32-make SYSTEM=WINDOWS CC=gcc bin/brogue.exe |
| 102 | + make SYSTEM=WINDOWS CC=gcc MT="$(cygpath -u 'C:\Program Files (x86)\Windows Kits\10\bin\10.0.22000.0\x64\mt.exe')" bin/brogue.exe |
| 103 | + ldd bin/brogue.exe |
102 | 104 |
|
103 | 105 | - name: "Create artifact"
|
| 106 | + shell: "msys2 {0}" |
104 | 107 | run: |
|
105 |
| - mingw32-make SYSTEM=WINDOWS BrogueCE-windows |
106 |
| - cp SDL2\x86_64-w64-mingw32\bin\SDL2.dll BrogueCE-windows |
107 |
| - cp SDL2_image\x86_64-w64-mingw32\bin\zlib1.dll BrogueCE-windows |
108 |
| - cp SDL2_image\x86_64-w64-mingw32\bin\SDL2_image.dll BrogueCE-windows |
109 |
| - cp SDL2_image\x86_64-w64-mingw32\bin\libpng16-16.dll BrogueCE-windows |
110 |
| - 7z a BrogueCE-windows-x86_64.zip BrogueCE-windows |
| 108 | + make SYSTEM=WINDOWS BrogueCE-windows |
111 | 109 |
|
112 | 110 | - name: "Upload artifact"
|
113 | 111 | uses: actions/upload-artifact@v4
|
|
0 commit comments