Update build.yml #28
Workflow file for this run
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: Build and Release | |
on: | |
push: | |
branches: | |
- actions | |
jobs: | |
build-ubuntu: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Install dependencies | |
run: | | |
sudo apt-get update && sudo apt-get install -y cmake libsfml-dev libudev-dev libopenal-dev libvorbis-dev libflac-dev libxrandr-dev libxcursor-dev | |
- name: Configure and build | |
run: | | |
mkdir build && cd build | |
cmake .. | |
cmake --build . | |
- name: Upload executable | |
uses: actions/upload-artifact@v2 | |
with: | |
name: ubuntu-executable | |
path: build/src/8ChocChip | |
build-windows: | |
name: Build and Package | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up CMake and Ninja | |
id: cmake_and_ninja | |
run: | | |
set(ninja_version "1.9.0") | |
set(cmake_version "3.16.2") | |
message(STATUS "Using host CMake version: ${CMAKE_VERSION}") | |
- name: Configure CMake | |
run: cmake -B build -S . | |
- name: Build | |
run: cmake --build build --config Release | |
- name: Package | |
run: cpack -C Release | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: my_project_artifact | |
path: build/8ChocChip.exe | |
# build-macos: | |
# runs-on: macos-latest | |
# steps: | |
# - name: Checkout code | |
# uses: actions/checkout@v2 | |
# - name: Install dependencies | |
# run: brew update && brew install cmake sfml | |
# - name: Configure and build | |
# run: | | |
# mkdir build && cd build | |
# cmake .. | |
# cmake --build . | |
# - name: Upload executable | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: macos-executable | |
# path: build/src/8ChocChip |