CI: add build action
Some checks failed
Build winecmdwrap for windows / Build (push) Has been cancelled
Some checks failed
Build winecmdwrap for windows / Build (push) Has been cancelled
This commit is contained in:
parent
e7972b56ad
commit
54f28ea7eb
3 changed files with 39 additions and 0 deletions
28
.gitea/workflows/build.yml
Normal file
28
.gitea/workflows/build.yml
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
name: Build winecmdwrap for windows
|
||||
run-name: Building winecmdwrap for windows
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
Build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: ischanx/checkout@8c80eac3058d03dc5301629e8f7d59ae255d6cc3
|
||||
- name: Install dependancies
|
||||
run: |
|
||||
apt update
|
||||
apt install -y cmake mingw-w64-x86-64-dev gcc-mingw-w64
|
||||
- name: Version
|
||||
id: version
|
||||
run: git fetch -a; echo "tag=$(git describe --tags `git rev-list --tags --max-count=1`)" >> $GITHUB_OUTPUT
|
||||
- name: Build
|
||||
run: |
|
||||
mkdir ${{ gitea.workspace }}/build
|
||||
cd ${{ gitea.workspace }}/build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr/x86_64-w64-mingw32/ -DCMAKE_TOOLCHAIN_FILE=../crossW64.cmake -DCMAKE_BUILD_TYPE=Release ..
|
||||
make
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: winecmdwrap-win-x86_64
|
||||
path: ${{ gitea.workspace }}/build/*exe
|
||||
|
|
@ -2,3 +2,4 @@ cmake_minimum_required(VERSION 3.16)
|
|||
project(winecmdwrap C)
|
||||
|
||||
add_executable(${PROJECT_NAME} main.c)
|
||||
target_compile_options(${PROJECT_NAME} PUBLIC -static)
|
||||
|
|
|
|||
10
crossW64.cmake
Normal file
10
crossW64.cmake
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
set(CMAKE_SYSTEM_NAME Windows)
|
||||
set(CMAKE_SYSTEM_PROCESSOR AMD64)
|
||||
set(CMAKE_C_COMPILER x86_64-w64-mingw32-gcc)
|
||||
set(CMAKE_CXX_COMPILER x86_64-w64-mingw32-g++)
|
||||
set(CMAKE_FIND_ROOT_PATH /usr/x86_64-w64-mingw32)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES ".a")
|
||||
Loading…
Add table
Add a link
Reference in a new issue