chore: nasm install script #88
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: C/C++ CI | |
on: [push] | |
jobs: | |
build-linux: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install deps | |
run: | | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends build-essential g++ gcc libass-dev pkg-config | |
- name: build | |
run: | | |
cmake -B build -S . | |
cmake --build build --clean-first | |
build-macos: | |
runs-on: macos-10.15 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install deps | |
run: | | |
brew install cmake libass | |
- name: build | |
run: | | |
cmake -B build -S . | |
cmake --build build --clean-first | |
build-mingw: | |
runs-on: windows-2019 | |
defaults: | |
run: | |
shell: msys2 {0} | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: msys2/setup-msys2@v2 | |
with: | |
update: true | |
install: base-devel git mingw-w64-x86_64-gcc mingw-w64-x86_64-cmake mingw-w64-x86_64-libass | |
msystem: MINGW64 | |
path-type: inherit | |
- name: build | |
run: | | |
cmake -G "MSYS Makefiles" -B build -S . | |
cmake --build build --clean-first | |
build-win: | |
runs-on: windows-2019 | |
strategy: | |
matrix: | |
include: | |
- target: 'x86' | |
platform: 'Win32' | |
- target: 'x64' | |
platform: 'x64' | |
steps: | |
- uses: actions/checkout@v2 | |
- name: install submodules and nasm | |
shell: cmd | |
run: | | |
git submodule update --init --recursive --remote | |
git clone https://github.com/ShiftMediaProject/VSNASM.git --branch 0.9 | |
.\VSNASM\install_script.bat | |
- name: force /MT build | |
shell: bash | |
run: | | |
sed -i -e 's|<ClCompile>|&<RuntimeLibrary>MultiThreaded</RuntimeLibrary>|g' SMP/*/SMP/*.vcxproj | |
sed -i -e 's|<ClCompile>|&<RuntimeLibrary>MultiThreaded</RuntimeLibrary>|g' assrender.vcxproj | |
- name: add msbuild to PATH | |
uses: microsoft/setup-msbuild@v1 | |
- name: build | |
run: MSBuild.exe /t:Rebuild /p:WindowsTargetPlatformVersion=10.0.19041.0 /p:PlatformToolset=v142 /m /p:Configuration=Release /p:Platform=${{matrix.target}} | |
- name: copy | |
run: cmake -E copy "bin\Release_${{matrix.platform}}\assrender.dll" dist\${{matrix.target}}\assrender.dll | |
- name: upload | |
uses: actions/upload-artifact@v2 | |
with: | |
name: assrender_bin | |
path: dist |