1
0
mirror of synced 2024-11-24 15:50:16 +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: on:
push: push:
branches: [ master ]
pull_request: pull_request:
env:
BUILD_TYPE: Release
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: windows-latest
@ -17,13 +19,12 @@ jobs:
#{ msystem: MINGW32, arch: i686 } #{ msystem: MINGW32, arch: i686 }
] ]
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Build - name: Setup
uses: msys2/setup-msys2@v2 uses: msys2/setup-msys2@v2
with: with:
msystem: ${{ matrix.msystem }} msystem: ${{ matrix.msystem }}

View File

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