summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaG1924 <12997935+LaG1924@users.noreply.github.com>2021-06-24 10:45:46 +0200
committerGitHub <noreply@github.com>2021-06-24 10:45:46 +0200
commit5916926cb25fe97346b0997eb54c296d62453bdc (patch)
tree7e11d4c86d82fe824f1e5958c808d71c32228741
parentMerge pull request #57 from LaG1924/ftr/rmlui (diff)
parentReplaced Travis-CI with Github Actions (diff)
downloadAltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.tar
AltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.tar.gz
AltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.tar.bz2
AltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.tar.lz
AltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.tar.xz
AltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.tar.zst
AltCraft-5916926cb25fe97346b0997eb54c296d62453bdc.zip
-rw-r--r--.github/workflows/ci.yml75
-rw-r--r--.travis.yml26
-rw-r--r--README.md2
3 files changed, 76 insertions, 27 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..7404806
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,75 @@
+name: CI
+
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+jobs:
+ build:
+ strategy:
+ matrix:
+ platform:
+ - name: Win64
+ os: windows-latest
+ cmake_param: -DCMAKE_GENERATOR_PLATFORM=x64
+ - name: Win32
+ os: windows-latest
+ cmake_param: -DCMAKE_GENERATOR_PLATFORM=Win32
+ - name: Linux
+ os: ubuntu-latest
+ cmake_param: -GNinja
+ - name: MacOS
+ os: macos-latest
+ cmake_param: -GNinja
+ build_type: [Debug, Release]
+ name: Build (${{ matrix.platform.name }}-${{ matrix.build_type }})
+ runs-on: ${{ matrix.platform.os }}
+
+ steps:
+ - uses: actions/checkout@v2
+ - uses: seanmiddleditch/gha-setup-ninja@master
+ - name: Prepare Linux
+ if: ${{ runner.os == 'Linux' }}
+ run: sudo apt install libgl1-mesa-dev libglu1-mesa-dev
+ - name: Set up cache
+ uses: actions/cache@v2
+ with:
+ path: ~/cpm-cache
+ key: ${{ runner.os }}-cpm-${{ hashFiles('**/') }}
+ restore-keys: |
+ ${{ runner.os }}-cpm-
+ - name: Configure CMake
+ run: cmake -B ${{ github.workspace }}/build ${{ matrix.platform.cmake_param }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCPM_SOURCE_CACHE=~/cpm-cache -DOPTICK_ENABLED=OFF
+ - name: Build
+ run: cmake --build ${{ github.workspace }}/build --config ${{ matrix.build_type }} --target AltCraft
+ - name: Upload debug symbols artifacts
+ uses: actions/upload-artifact@v2
+ if: ${{ runner.os == 'Windows' }}
+ with:
+ name: symbols-${{ matrix.platform.name }}-${{ matrix.build_type }}
+ path: ${{ github.workspace }}/build/**/*.pdb
+ - name: Copy binaries for packaging
+ run: mkdir $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package && find $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/build -type f \( -name "*.exe" -o -name "*.dll" -o -name "*.dylib" -o -name "*.so" \) -exec cp {} $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package \;
+ shell: bash
+ - name: Finish binaries
+ run: cp $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/build/AltCraft $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package/AltCraft || rm -f $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package/CompilerIdC*.exe
+ shell: bash
+ - name: Download MC:JE assets
+ run: curl https://launcher.mojang.com/v1/objects/0f275bc1547d01fa5f56ba34bdc87d981ee12daf/client.jar --output $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/client.jar && unzip $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/client.jar -d $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/mc-assets
+ shell: bash
+ - name: Copy AC and MC assets
+ run: cp -r $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/mc-assets/assets $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package && cp -r $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/cwd/* $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package
+ shell: bash
+ - name: Download and copy fonts
+ run: mkdir $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package/assets/altcraft/fonts && curl -L https://github.com/google/fonts/raw/main/apache/opensans/OpenSans%5Bwdth%2Cwght%5D.ttf --output $(echo "${{ github.workspace }}"|sed 's/\\/\//g')/package/assets/altcraft/fonts/OpenSans-Regular.ttf
+ shell: bash
+ - name: Upload package artifacts
+ uses: actions/upload-artifact@v2
+ with:
+ name: AltCraft-${{ matrix.platform.name }}-${{ matrix.build_type }}
+ path: ${{ github.workspace }}/package
+ \ No newline at end of file
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index 11c8b32..0000000
--- a/.travis.yml
+++ /dev/null
@@ -1,26 +0,0 @@
-dist: focal
-sudo: required
-language: cpp
-compiler: gcc
-os: linux
-
-addons:
- apt:
- packages:
- - cmake
- - g++
- - libgl1-mesa-dev
- - libglu1-mesa-dev
-
-matrix:
- include:
- - name: "Debug build"
- env: BUILD_TYPE=Debug
- - name: "Release build"
- env: BUILD_TYPE=RelWithDebInfo
-
-script:
- - mkdir build
- - cd build
- - cmake .. -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPTICK_ENABLED=OFF
- - cmake --build .
diff --git a/README.md b/README.md
index d0380e7..0f11119 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# AltCraft [![Build Status](https://travis-ci.org/LaG1924/AltCraft.svg?branch=master)](https://travis-ci.org/LaG1924/AltCraft)
+# AltCraft [![CI](https://github.com/LaG1924/AltCraft/actions/workflows/ci.yml/badge.svg?event=push)](https://github.com/LaG1924/AltCraft/actions/workflows/ci.yml)
AltCraft is implementation of [Minecraft: Java Edition (1.12.2)](https://minecraft.net) in C++.
This is aimed at being fast, being free and being easy expandable.