[v1.0] Add automatic build action.
All checks were successful
Build / build (push) Successful in 34s
All checks were successful
Build / build (push) Successful in 34s
Try adding secrets to the workflow script. Fix workflow. Fix typo. fix docker name conflict. Removed cmake files from this repository and added node and meson to the apt packages list. Update .gitea/workflows/build.yaml node -> nodejs
This commit is contained in:
parent
0131d764b9
commit
ac01f7f2aa
22
.gitea/workflows/build.yaml
Normal file
22
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
name: Build
|
||||||
|
run-name: Building docker container.
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: stable
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Update Package Repository.
|
||||||
|
run: apt update -y
|
||||||
|
- name: Gather dependencies.
|
||||||
|
run: apt install -y docker.io
|
||||||
|
- name: Log into Docker registry.
|
||||||
|
run: "echo ${{secrets.QUIK_API_KEY}} | docker login -u themixedupstuff --password-stdin git.mixedup.dev"
|
||||||
|
- name: Check repository out.
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
- name: Build Docker Image
|
||||||
|
run: docker build -t git.mixedup.dev/quik/docker-cross-compiler .
|
||||||
|
- name: Upload Docker Image
|
||||||
|
run: docker push git.mixedup.dev/quik/docker-cross-compiler
|
@ -37,8 +37,10 @@ RUN echo docker_cross_compiler > /etc/hostname
|
|||||||
libxml2-dev \
|
libxml2-dev \
|
||||||
lzma-dev \
|
lzma-dev \
|
||||||
mingw-w64 \
|
mingw-w64 \
|
||||||
|
meson \
|
||||||
nuget \
|
nuget \
|
||||||
ninja-build \
|
ninja-build \
|
||||||
|
nodejs \
|
||||||
patch \
|
patch \
|
||||||
python3 \
|
python3 \
|
||||||
xz-utils \
|
xz-utils \
|
||||||
|
@ -1,13 +0,0 @@
|
|||||||
# QUIK Toolchain file for Linux-arm systems.
|
|
||||||
# Copyright (C) 2023
|
|
||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Linux)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH "/usr/arm-linux-gnueabihf")
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -1,13 +0,0 @@
|
|||||||
# QUIK Toolchain file for Linux-arm64 (aarch64) systems.
|
|
||||||
# Copyright (C) 2023
|
|
||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Linux)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER aarch64-linux-gnu-gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER aarch64-linux-gnu-g++)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH "/usr/aarch64-linux-gnu")
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -1,9 +0,0 @@
|
|||||||
# QUIK Toolchain file for Linux-x64 (amd64) systems.
|
|
||||||
# Copyright (C) 2023
|
|
||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Linux)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER g++)
|
|
||||||
|
|
||||||
add_compile_options(-m64)
|
|
@ -1,14 +0,0 @@
|
|||||||
# QUIK Toolchain file for Linux-x86 (i386) systems.
|
|
||||||
# Copyright (C) 2023
|
|
||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Linux)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER i686-linux-gnu-gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER i686-linux-gnu-g++)
|
|
||||||
|
|
||||||
add_compile_options(-m32 -march=i686)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH "/usr/i686-linux-gnu")
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -1,14 +0,0 @@
|
|||||||
# QUIK Toolchain file for Windows-x64 systems.
|
|
||||||
# Copyright (C) 2023
|
|
||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Windows)
|
|
||||||
|
|
||||||
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")
|
|
||||||
add_compile_options(-m64)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -1,14 +0,0 @@
|
|||||||
# QUIK Toolchain file for Windows-x86 systems.
|
|
||||||
# Copyright (C) 2023
|
|
||||||
|
|
||||||
set(CMAKE_SYSTEM_NAME Windows)
|
|
||||||
|
|
||||||
set(CMAKE_C_COMPILER i686-w64-mingw32-gcc)
|
|
||||||
set(CMAKE_CXX_COMPILER i686-w64-mingw32-g++)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH "/usr/i686-w64-mingw32")
|
|
||||||
add_compile_options(-m32)
|
|
||||||
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
|
|
||||||
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
|
|
@ -1,49 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
# $1 Source path of the project.
|
|
||||||
# $2 Target architecture list.
|
|
||||||
# DST is the destination directory.
|
|
||||||
|
|
||||||
SRC=$1
|
|
||||||
ARCHS=$2
|
|
||||||
|
|
||||||
if [ -z "$SRC" ]
|
|
||||||
then
|
|
||||||
echo You need to provide a source path.
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$ARCHS" ]
|
|
||||||
then
|
|
||||||
ARCHS="linux-arm linux-arm64 linux-x64 win-x64 win-x86"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$DST" ]
|
|
||||||
then
|
|
||||||
DST=$PWD
|
|
||||||
fi
|
|
||||||
|
|
||||||
for ARCH in $ARCHS; do
|
|
||||||
# Output directory.
|
|
||||||
PREFIX=$DST/runtimes/$ARCH/native
|
|
||||||
# Build directory.
|
|
||||||
BUILD=$DST/out/$ARCH
|
|
||||||
# Cmake toolchain file.
|
|
||||||
TOOLCHAIN=$DST/../cmake/$ARCH.cmake
|
|
||||||
|
|
||||||
# Create directories.
|
|
||||||
mkdir -p $PREFIX $BUILD
|
|
||||||
# Configure CMAKE.
|
|
||||||
cmake -B $BUILD -S $SRC \
|
|
||||||
-G Ninja \
|
|
||||||
-DCMAKE_BUILD_TYPE=Release \
|
|
||||||
-DCMAKE_C_FLAGS=-static-libgcc \
|
|
||||||
-DCMAKE_CXX_FLAGS=-static-libgcc \
|
|
||||||
-DCMAKE_INSTALL_PREFIX=$PREFIX \
|
|
||||||
-DCMAKE_TOOLCHAIN_FILE=$TOOLCHAIN \
|
|
||||||
$QUIK_ADDITIONAL_CMAKE
|
|
||||||
|
|
||||||
# Build and install.
|
|
||||||
ninja -C $BUILD all
|
|
||||||
ninja -C $BUILD install
|
|
||||||
done
|
|
Loading…
Reference in New Issue
Block a user