Migrate CI from travis-ci.com to GitHub Actions

This commit is contained in:
Leroy Hopson 2020-11-06 12:57:25 +07:00 committed by Leroy Hopson
parent 630e0104d5
commit 43df7d5331
9 changed files with 57 additions and 27 deletions

View file

@ -1,3 +1,3 @@
addons/godot_xterm/native/external/*
addons/godot_xterm/native/bin/**/*
addons/godot_xterm/native/bin/*
addons/godot_xterm/native/.sconsign*.dblite

27
.github/workflows/main.yml vendored Normal file
View file

@ -0,0 +1,27 @@
name: build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-nixos:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build for supported platforms on NixOS
run: docker-compose run build-nixos
build-archlinux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build for supported platforms on Arch Linux
run: docker-compose run build-archlinux
build-ubuntu:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build for supported platforms on Ubuntu
run: docker-compose run build-ubuntu

View file

@ -1,15 +0,0 @@
language: nix
services:
- docker
jobs:
include:
- name: "Build native libs on Arch Linux"
env: SERVICE=build-archlinux
- name: "Build native libs on NixOS"
env: SERVICE=build-nixos
- name: "Build native libs on Ubuntu"
env: SERVICE=build-ubuntu
script: docker-compose run $SERVICE

View file

@ -5,7 +5,7 @@
![Version](https://img.shields.io/badge/version-0.1.0-orange.svg)
![Godot Version](https://img.shields.io/badge/godot-3.2+-blue.svg)
![License](https://img.shields.io/badge/license-MIT-green.svg)
[![Build Status](https://travis-ci.com/lihop/godot-xterm.svg?branch=master)](https://travis-ci.com/lihop/godot-xterm)
[![Build Status](https://github.com/lihop/godot-xterm/workflows/build/badge.svg?branch=master)](https://github.com/lihop/godot-xterm/actions?query=branch%3Amaster)
Terminal emulator for Godot using GDNative and [libtsm](https://github.com/Aetf/libtsm).

View file

@ -9,7 +9,7 @@ NATIVE_DIR="$( cd "$(dirname "$0")" >/dev/null 2>&1 ; pwd -P )"
# Run script inside a nix shell if it is available.
if command -v nix-shell && [ $NIX_PATH ] && [ -z $IN_NIX_SHELL ]; then
cd ${NATIVE_DIR}
nix-shell --pure --command "./build.sh $1"
nix-shell --pure --run "NIX_PATH=${NIX_PATH} ./build.sh $1"
exit
fi
@ -34,7 +34,9 @@ case $1 in
# Cross-compile release build for all platforms.
scons platform=linux bits=64 target=release -j$(nproc)
if [ $IN_NIX_SHELL ]; then
nix-shell --pure --argstr system i686-linux --run 'scons platform=linux bits=32 target=release -j$(nproc)'
nix-shell --pure --argstr system i686-linux --run "NIX_PATH=${NIX_PATH} scons platform=linux bits=32 target=release -j$(nproc)"
else
scons platform=linux bits=32 target=release -j$(nproc)
fi
scons platform=windows bits=64 target=release -j$(nproc)
#scons platform=windows bits=32 target=release -j$(nproc)

View file

@ -6,6 +6,7 @@ with (import <nixpkgs> {
mkShell {
buildInputs = with pkgs; [
binutils.bintools
cacert
cmake
git
libxkbcommon

View file

@ -4,7 +4,7 @@ services:
build:
context: .
dockerfile: ./dockerfiles/archlinux
command: /src/addons/godot_xterm/native/build.sh
command: /src/addons/godot_xterm/native/build.sh release-all
build-nixos:
build:
context: .
@ -14,4 +14,4 @@ services:
build:
context: .
dockerfile: ./dockerfiles/ubuntu
command: /src/addons/godot_xterm/native/build.sh
command: /src/addons/godot_xterm/native/build.sh release-all

View file

@ -1,7 +1,14 @@
FROM archlinux:20200908
RUN pacman -Sy --needed --noconfirm \
base-devel \
cmake \
# The following are required to compile for any platform:
git \
scons
scons \
# The following are required to compile for 64-bit Linux:
base-devel \
# The following are required to compile for 32-bit Linux:
multilib-devel \
# The following is required to cross-compile for 32/64-bit Windows:
mingw-w64-gcc \
# The following is required to cross-compile for MacOS:
clang
COPY . /src

View file

@ -1,8 +1,16 @@
FROM ubuntu:18.04
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
# The following are required to compile for any platform:
git \
python3 \
scons
scons \
# The following are required to compile for 64-bit Linux:
build-essential \
# The following are required to compile for 32-bit Linux:
gcc-multilib \
g++-multilib \
# The following is required to cross-compile for 32/64-bit Windows:
g++-mingw-w64-x86-64 \
# The following is required to cross-compile for MacOS:
clang
COPY . /src