Skip to content

Match weapon_017

Match weapon_017 #3111

Workflow file for this run

name: Build C code
on:
push:
branches:
- master
paths:
- 'include/**'
- 'src/**'
- 'tools/sotn-assets/**'
- 'cmake/**'
- 'CMakeLists*'
pull_request:
paths:
- 'include/**'
- 'src/**'
- 'tools/sotn-assets/**'
- 'cmake/**'
- 'CMakeLists*'
workflow_dispatch:
jobs:
extract-assets:
runs-on: ubuntu-latest
steps:
- name: Clone main repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get dependencies
uses: actions/cache@v4
id: get-dependencies
with:
path: 'disks/dependencies'
key: sotn-us-deps
- name: Setting up dependencies
working-directory: disks
run: cat dependencies/* | tar -zxf -
- name: Extract dependencies
run: make extract_disk
- name: Extract game assets
run: |
make update-dependencies
make -j extract
make -j extract_assets
- name: Export assets
uses: actions/upload-artifact@v4
with:
name: assets
path: assets
build-linux:
runs-on: ubuntu-latest
needs: extract-assets
steps:
- name: Install requirements
run: sudo apt-get update && sudo apt-get install build-essential libsdl2-dev
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
cmake -B ${{github.workspace}}/pc
cmake --build ${{github.workspace}}/pc --config Release
build-macos:
runs-on: macos-latest
needs: extract-assets
steps:
- name: Install requirements
run: brew install SDL2
- name: Install Go
run: |
curl -L -o go.tar.gz https://go.dev/dl/go1.22.4.darwin-amd64.tar.gz
tar -C ~ -xzf go.tar.gz
rm go.tar.gz
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
cmake -B ${{github.workspace}}/pc
cmake --build ${{github.workspace}}/pc --config Release
build-windows:
runs-on: windows-latest
needs: extract-assets
steps:
- name: Install requirements
run: |
mkdir C:\temp-sdl2
powershell Invoke-WebRequest 'https://github.com/libsdl-org/SDL/releases/download/release-2.28.5/SDL2-devel-2.28.5-VC.zip' -OutFile C:\temp-sdl2\SDL2-devel-2.28.5-VC.zip
7z x C:\temp-sdl2\SDL2-devel-2.28.5-VC.zip -oC:\temp-sdl2
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- uses: actions/setup-go@v5
with:
go-version: '^1.22.4'
- name: Build assets
run: |
cd tools/sotn-assets; go install; cd -
$SOTN_ASSETS = (Get-Command sotn-assets).Source
& make -j build_assets SOTNASSETS=$SOTN_ASSETS
- name: Build
run: |
cmake -B ${{github.workspace}}/pc -DCMAKE_BUILD_TYPE=Release -DSDL2_PATH=C:\temp-sdl2\SDL2-2.28.5
cmake --build ${{github.workspace}}/pc --config Release
build-linux-lle:
runs-on: ubuntu-latest
needs: extract-assets
steps:
- name: Install requirements
run: sudo apt-get update && sudo apt-get install build-essential libsdl2-dev
- name: Clone repo
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
submodules: false
- name: Get assets
uses: actions/download-artifact@v4
with:
name: assets
path: assets
- name: Build assets
run: make -j build_assets
- name: Build
run: |
cmake -B ${{github.workspace}}/pc -DWANT_LIBSND_LLE=1
cmake --build ${{github.workspace}}/pc --config Release
- name: Test
run: |
${{github.workspace}}/pc/Sound test