|
9 | 9 | - 'CMakeLists.txt' |
10 | 10 |
|
11 | 11 | jobs: |
12 | | - build: |
13 | | - name: ${{ matrix.os }} Release |
14 | | - runs-on: ${{ matrix.os }} |
15 | | - |
16 | | - strategy: |
17 | | - fail-fast: true |
18 | | - |
19 | | - matrix: |
20 | | - os: [ubuntu-latest, windows-latest] |
| 12 | + build-windows: |
| 13 | + runs-on: windows-latest |
21 | 14 |
|
22 | 15 | steps: |
23 | | - - uses: actions/checkout@v4 |
| 16 | + - uses: actions/checkout@v6 |
24 | 17 | with: |
25 | 18 | submodules: recursive |
26 | | - |
27 | | - - if: ${{matrix.os == 'ubuntu-latest'}} |
28 | | - name: Update packages |
29 | | - uses: awalsh128/cache-apt-pkgs-action@latest |
30 | | - with: |
31 | | - packages: libglfw3-dev gcc-multilib g++-multilib libvulkan-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev |
32 | | - version: 1.0 |
33 | 19 |
|
34 | | - - if: ${{matrix.os == 'windows-latest'}} |
35 | | - name: Install Vulkan SDK |
| 20 | + - name: Install Vulkan SDK |
36 | 21 | run: | |
37 | | - curl -O https://sdk.lunarg.com/sdk/download/latest/windows/vulkan_sdk.exe |
| 22 | + Invoke-WebRequest -Uri "https://sdk.lunarg.com/sdk/download/latest/windows/vulkan_sdk.exe" -OutFile .\vulkan_sdk.exe |
38 | 23 | .\vulkan_sdk.exe --accept-licenses --default-answer --confirm-command install |
39 | 24 |
|
40 | | - - if: ${{matrix.os == 'ubuntu-latest'}} |
41 | | - name: Configure for linux |
42 | | - run: > |
43 | | - cmake -B build |
44 | | - -DCMAKE_BUILD_TYPE=Release |
45 | | - -DCMAKE_CXX_COMPILER=g++ |
46 | | - -DCMAKE_C_COMPILER=gcc |
47 | | -
|
48 | | - - if: ${{matrix.os == 'windows-latest'}} |
49 | | - name: Configure for windows |
| 25 | + - name: Configure for windows |
50 | 26 | run: | |
51 | | - curl -o .\windows.json https://vulkan.lunarg.com/sdk/latest/windows.json |
| 27 | + Invoke-WebRequest https://vulkan.lunarg.com/sdk/latest/windows.json -OutFile windows.json |
52 | 28 | $env:VULKAN_VERSION = (Get-Content windows.json | ConvertFrom-Json).windows |
53 | 29 | $env:VULKAN_SDK = "C:\VulkanSDK\$env:VULKAN_VERSION" |
54 | 30 | $env:VK_SDK_PATH = "C:\VulkanSDK\$env:VULKAN_VERSION" |
55 | 31 | $env:Vulkan_LIBRARY = "C:\VulkanSDK\$env:VULKAN_VERSION\Lib\vulkan-1.lib" |
56 | 32 | $env:Vulkan_INCLUDE_DIR = "C:\VulkanSDK\$env:VULKAN_VERSION\Include" |
57 | 33 | Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1 |
58 | 34 | refreshenv |
59 | | - cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DCMAKE_C_COMPILER=gcc |
| 35 | + cmake -B build -DCMAKE_BUILD_TYPE=Release |
60 | 36 |
|
61 | 37 | - name: Build release |
62 | 38 | run: cmake --build build --config Release |
63 | 39 |
|
64 | | - - name: Upload Artifact |
65 | | - uses: actions/upload-artifact@v4 |
| 40 | + - name: Upload artifacts |
| 41 | + uses: actions/upload-artifact@v6 |
| 42 | + with: |
| 43 | + name: windows-latest |
| 44 | + path: build/Release/FileToByte.exe |
| 45 | + |
| 46 | + build-linux: |
| 47 | + runs-on: ubuntu-latest |
| 48 | + |
| 49 | + steps: |
| 50 | + - uses: actions/checkout@v6 |
66 | 51 | with: |
67 | | - name: ${{ matrix.os }} |
68 | | - path: build/**/FileToByte* |
| 52 | + submodules: recursive |
| 53 | + |
| 54 | + - name: Update packages |
| 55 | + run: | |
| 56 | + sudo apt-get update |
| 57 | + sudo apt-get install -y gcc-multilib g++-multilib libglfw3-dev vulkan-tools libvulkan-dev libxkbcommon-dev libxinerama-dev libxcursor-dev libxi-dev |
| 58 | +
|
| 59 | + - name: Configure for linux |
| 60 | + run: cmake -B build -DCMAKE_BUILD_TYPE=Release |
| 61 | + |
| 62 | + - name: Build release |
| 63 | + run: cmake --build build --config Release |
| 64 | + |
| 65 | + - name: Upload artifacts |
| 66 | + uses: actions/upload-artifact@v6 |
| 67 | + with: |
| 68 | + name: ubuntu-latest |
| 69 | + path: build/FileToByte |
69 | 70 |
|
70 | 71 | release: |
71 | 72 | name: Release |
72 | | - runs-on: [ubuntu-latest] |
73 | | - needs: [build] |
| 73 | + runs-on: ubuntu-latest |
| 74 | + needs: [build-windows, build-linux] |
74 | 75 |
|
75 | 76 | steps: |
76 | | - - uses: actions/checkout@v4 |
| 77 | + - uses: actions/checkout@v6 |
77 | 78 |
|
78 | 79 | - name: Download Linux Artifact |
79 | | - uses: actions/download-artifact@v4 |
| 80 | + uses: actions/download-artifact@v7 |
80 | 81 | with: |
81 | 82 | name: ubuntu-latest |
82 | 83 |
|
83 | 84 | - name: Download Windows Artifact |
84 | | - uses: actions/download-artifact@v4 |
| 85 | + uses: actions/download-artifact@v7 |
85 | 86 | with: |
86 | 87 | name: windows-latest |
87 | 88 |
|
|
0 commit comments