1
0
mirror of synced 2024-11-24 07:40:17 +01:00

CI: Add a GitHub Action to build on Ubuntu 20.04 LTS

Also clean up MSYS2 action.
This commit is contained in:
Mary 2020-12-05 19:01:33 +01:00
parent 05cb3831a2
commit 727b3c6b10
3 changed files with 68 additions and 19 deletions

44
.github/workflows/build_linux.yml vendored Normal file
View File

@ -0,0 +1,44 @@
name: build-linux
on:
push:
pull_request:
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y build-essential \
gcc-10 \
g++-10 \
pkg-config \
cmake \
make \
libglfw3-dev \
libglm-dev \
libmagic-dev \
libssl-dev \
libcapstone-dev \
llvm-dev \
nlohmann-json3-dev \
python3-dev \
- name: Build
shell: bash
run: |
mkdir build
cd build
CC=gcc-10 CXX=g++-10 cmake ..
make -j 4

View File

@ -2,9 +2,11 @@ name: build-win
on:
push:
branches: [ master ]
pull_request:
env:
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-latest
@ -17,23 +19,22 @@ jobs:
#{ msystem: MINGW32, arch: i686 }
]
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-capstone mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-llvm mingw-w64-${{ matrix.arch }}-nlohmann-json mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-python
update: true
- name: Build
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.msystem }}
install: mingw-w64-${{ matrix.arch }}-gcc mingw-w64-${{ matrix.arch }}-cmake mingw-w64-${{ matrix.arch }}-make mingw-w64-${{ matrix.arch }}-capstone mingw-w64-${{ matrix.arch }}-glfw mingw-w64-${{ matrix.arch }}-glm mingw-w64-${{ matrix.arch }}-file mingw-w64-${{ matrix.arch }}-llvm mingw-w64-${{ matrix.arch }}-nlohmann-json mingw-w64-${{ matrix.arch }}-openssl mingw-w64-${{ matrix.arch }}-polly mingw-w64-${{ matrix.arch }}-python
update: true
- name: Build
shell: msys2 {0}
run: |
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make -j 4
- name: Build
shell: msys2 {0}
run: |
mkdir build
cd build
cmake -G "MinGW Makefiles" ..
mingw32-make -j 4

View File

@ -1,8 +1,12 @@
cmake_minimum_required(VERSION 3.16)
project(HexEditor)
SET(CMAKE_FIND_PACKAGE_SORT_ORDER NATURAL)
SET(CMAKE_FIND_PACKAGE_SORT_DIRECTION DEC)
set(CMAKE_CXX_STANDARD 20)
find_package(PkgConfig REQUIRED)
pkg_search_module(GLFW REQUIRED glfw3)
pkg_search_module(GLM REQUIRED glm)