fix: missing include and link options #36
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: CI | |
env: | |
BUILD_TYPE: Release | |
BUILD_PATH: build | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
build_on_windows_msys2: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
update: true | |
install: git mingw-w64-ucrt-x86_64-toolchain | |
- name: Configure build | |
run: cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }} | |
- name: Build | |
run: cmake --build ${{ env.BUILD_PATH }} -j 4 | |
- name: Strip | |
run: strip ${{ env.BUILD_PATH }}/ncmdump.exe | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows amd64 Build - MinGW | |
path: ${{ env.BUILD_PATH }}/ncmdump.exe | |
build_on_windows_msvc: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Configure build | |
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }} | |
- name: Build | |
run: cmake --build ${{ env.BUILD_PATH }} -j 4 --config ${{ env.BUILD_TYPE }} | |
- name: Upload artifact executable | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows amd64 Build - MSVC | |
path: ${{ env.BUILD_PATH }}/${{ env.BUILD_TYPE }}/ncmdump.exe | |
- name: Upload artifact DLL | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Windows amd64 Build - MSVC DLL | |
path: ${{ env.BUILD_PATH }}/${{ env.BUILD_TYPE }}/libncmdump.dll | |
build_on_linux: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y build-essential cmake | |
- name: Configure build | |
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }} | |
- name: Build | |
run: cmake --build ${{ env.BUILD_PATH }} -j 4 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Linux amd64 Build | |
path: ${{ env.BUILD_PATH }}/ncmdump | |
build_on_macos: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install dependencies | |
run: | | |
brew install git cmake | |
- name: Configure build | |
run: cmake -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -B ${{ env.BUILD_PATH }} | |
- name: Build | |
run: cmake --build ${{ env.BUILD_PATH }} -j 4 | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macOS amd64 Build | |
path: ${{ env.BUILD_PATH }}/ncmdump |