-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
28 changed files
with
1,439 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
@echo off | ||
|
||
SET VSWHERE="C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere" | ||
|
||
:: See https://github.com/microsoft/vswhere/wiki/Find-VC | ||
for /f "usebackq delims=*" %%i in (`%VSWHERE% -latest -property installationPath`) do ( | ||
call "%%i"\Common7\Tools\vsdevcmd.bat %* | ||
) | ||
|
||
:: Loop over all environment variables and make them global using set-env. | ||
:: See: https://help.github.com/en/articles/development-tools-for-github-actions#set-an-environment-variable-set-env | ||
:: See: https://stackoverflow.com/questions/39183272/loop-through-all-environmental-variables-and-take-actions-depending-on-prefix | ||
setlocal | ||
for /f "delims== tokens=1,2" %%a in ('set') do ( | ||
echo ::set-env name=%%a::%%b | ||
) | ||
endlocal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
on: push | ||
name: Build | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BAZELISK_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
jobs: | ||
build_on_ubuntu: | ||
name: Build on ubuntu | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install | ||
run: sudo apt update && sudo apt-get install -y libgl1-mesa-dev xorg-dev | ||
- run: bazelisk build voidstar | ||
|
||
build_on_macos: | ||
name: Build on macos | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/setup-python@v1 | ||
with: | ||
python-version: '3.x' | ||
- uses: actions/checkout@v2 | ||
- run: bazelisk build voidstar | ||
|
||
build_on_windows: | ||
name: Build on windows | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# Trying to install & use GCC | ||
# From https://github.com/onqtam/doctest/pull/285/files | ||
- name: Install (Windows) | ||
shell: powershell | ||
run: | | ||
Invoke-Expression (New-Object System.Net.WebClient).DownloadString('https://get.scoop.sh') | ||
scoop install ninja --global | ||
#if ("${{ matrix.compiler }}".StartsWith("clang")) { | ||
# scoop install llvm --global | ||
#} | ||
#if ("${{ matrix.compiler }}" -eq "gcc") { | ||
# Chocolatey GCC is broken on the windows-2019 image. | ||
# See: https://github.com/DaanDeMeyer/doctest/runs/231595515 | ||
# See: https://github.community/t5/GitHub-Actions/Something-is-wrong-with-the-chocolatey-installed-version-of-gcc/td-p/32413 | ||
scoop install gcc --global | ||
echo "::set-env name=CC::gcc" | ||
echo "::set-env name=CXX::g++" | ||
#} elseif ("${{ matrix.compiler }}" -eq "clang") { | ||
# echo "::set-env name=CC::clang" | ||
# echo "::set-env name=CXX::clang++" | ||
#} else { | ||
# echo "::set-env name=CC::${{ matrix.compiler }}" | ||
# echo "::set-env name=CXX::${{ matrix.compiler }}" | ||
#} | ||
# Scoop modifies the PATH so we make the modified PATH global. | ||
echo "::set-env name=PATH::$env:PATH" | ||
- name: Configure x64 | ||
run: .github\workflows\vsenv.bat -arch=x64 -host_arch=x64 | ||
|
||
- shell: bash | ||
run: | | ||
gcc --version || true | ||
clang --version || true | ||
- run: bazelisk build voidstar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
travis-miners | ||
|
||
/build | ||
|
||
/parts | ||
/prime | ||
/snap/.snapcraft | ||
/stage | ||
/voidstar_*.snap | ||
/bazel-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,81 +1,11 @@ | ||
sudo: false | ||
language: cpp | ||
compiler: | ||
- clang | ||
- gcc | ||
os: | ||
- osx | ||
- linux | ||
|
||
addons: | ||
apt: | ||
packages: | ||
- libglew-dev | ||
- xorg-dev | ||
- libgl1-mesa-dev | ||
- libc++-dev | ||
- cppcheck | ||
|
||
before_install: | ||
- openssl aes-256-cbc -K $encrypted_b87f4dd04cd0_key -iv $encrypted_b87f4dd04cd0_iv -in travis-miners.enc -out travis-miners -d | ||
|
||
install: | ||
- | | ||
case "$TRAVIS_OS_NAME" in | ||
'osx') | ||
travis_wait 15 brew update | ||
travis_wait 15 brew install glew | ||
curl -#fSLo ./bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-darwin-amd64 && chmod +x ./bazel | ||
;; | ||
'linux') | ||
curl -#fSLo ./bazel https://github.com/bazelbuild/bazelisk/releases/latest/download/bazelisk-linux-amd64 && chmod +x ./bazel | ||
;; | ||
esac | ||
before_script: | ||
- ./bazel --version || true | ||
- $CC --version || true | ||
- $CXX --version || true | ||
|
||
script: | ||
- ./bazel build //voidstar | ||
- ./bazel-bin/voidstar/voidstar -h | ||
- ./bazel-bin/voidstar/voidstar --help | ||
- ./bazel-bin/voidstar/voidstar -l | ||
- ./bazel-bin/voidstar/voidstar --list | ||
#- ./bazel-bin/voidstar/voidstar $(echo */) | ||
- mv -v bazel-bin/voidstar/voidstar "bazel-bin/voidstar/voidstar-$(git describe --abbrev --dirty --always --tags)-$TRAVIS_OS_NAME-$(basename $CC)" | ||
- if [[ "$TRAVIS_OS_NAME" = 'linux' ]]; then cppcheck --error-exitcode=1 --enable=all -Ivoidstar/include/ voids tar/; fi | ||
|
||
after_success: | ||
- | | ||
if [[ "$TRAVIS_SECURE_ENV_VARS" == 'true' ]] && [[ "$TRAVIS_BRANCH" == 'master' ]] && [[ "$TRAVIS_PULL_REQUEST" == 'false' ]] && [[ "$TRAVIS_OS_NAME" == 'linux' ]]; then | ||
major=v1 | ||
minor="$(($(git describe --tags | grep $major | cut -d. -f2) + 1))" | ||
tag=$major.$minor.$TRAVIS_BUILD_ID | ||
echo Tag: $tag | ||
msg="$(git log -1 --pretty=%B | head -n 1)" | ||
echo "Message: $msg" | ||
echo Commit: $TRAVIS_COMMIT | ||
if [[ 0 -ne "$(git tag --contains $TRAVIS_COMMIT | wc -l)" ]]; then echo 'Already tagged this commit!' && exit 0; fi | ||
git config --global user.email '[email protected]' | ||
git config --global user.name 'Autotag' | ||
git remote set-url origin [email protected]:$TRAVIS_REPO_SLUG.git | ||
git tag -a $tag -m "$msg" $TRAVIS_COMMIT | ||
chmod 600 travis-miners | ||
eval `ssh-agent -s` | ||
ssh-add travis-miners | ||
echo Tagging $TRAVIS_COMMIT with $tag | ||
git push --tags || true | ||
fi | ||
deploy: | ||
provider: releases | ||
api_key: | ||
secure: cu/xvTwEXo4SD9BUb84dRSBCu8NB5KaHEFhERVlwGd9feKllpRpo1Vaflwzmoa/JEpdq5cgIV4b4f8OUtmPHlCeHq0nq6l7+Sl0p0yW0juSH0rDvJgJTde+Rma70RKVjz4mgtgLHa/PKNBHbdPl3kmVQ/aUZtF1qYN6ObiS+a+gIFQcUX0IQfJhBHRLxmc94ozW/9FxXzz0zhENeE8PWAMhAWdmxHnlYQPBuWw6EYsbzhD5s1lkywzBNprJ+XTqtc7dgTUUwZ7UkkhpQ4RrfRzjJUpKb2pjDo+8WZhsCjYnQRTCquKF4eoDM2barD/KuzRx/W+pD+eLZG7NLlm4t592mVwO+p9py330+UgS8JdNl+GJfq9QrK23Uo6FMaG/SoHO1qFd5J5RHdFO0QhCKj/BxSirayc0Jv4e04X7a8ssasIX19KpINiZO/kQZAhioumm7UXLo6cKn1nzPbPkZJ7efvKkauSMCkQgd/UZ07P3ZxgEYn9eU3KLohNq1HFxCoBsCwSXSqSkUAVRA0QAgJBUCeD/ZCuRi5icgbi7AT/OeiP0YXoi1o6aGqMIp5AQ3ysSOosJRuwSjbeZ1YgxonqVYATH1jJPg0fzyPASLGIx90UN8MmBxe/CXk0gNOrf3TTYYgdWErwB1lRcbb0fZvYfu/FDb3vp2tQjTrM/Q+qY= | ||
skip_cleanup: true | ||
overwrite: true | ||
file_glob: true | ||
file: bazel-bin/voidstar/voidstar-* | ||
on: | ||
tags: true | ||
# - mv -v bazel-bin/voidstar/voidstar "bazel-bin/voidstar/voidstar-$(git describe --abbrev --dirty --always --tags)-$TRAVIS_OS_NAME-$(basename $CC)" | ||
- cppcheck --error-exitcode=1 --enable=all -Ivoidstar/include/ voids tar/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
licenses(["notice"]) | ||
exports_files(["LICENSE"]) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,64 @@ | ||
workspace(name = "voidstar") | ||
|
||
load("@bazel_tools//tools/build_defs/repo:http.bzl", bare_http_archive = "http_archive") | ||
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") | ||
|
||
bare_http_archive( | ||
name = "bazel_lock", | ||
# Locked on 2020-04-04 | ||
sha256 = "ce1a1c3753b970419c8d5ea3e5afbc24ad62beacbb32c48672186c78411540f8", | ||
strip_prefix = "bazel_lock-081217b3d17d9a8a817eb8fd4ec6058145126a2c", | ||
type = "zip", | ||
url = "https://github.com/fenollp/bazel_lock/archive/081217b3d17d9a8a817eb8fd4ec6058145126a2c.zip", | ||
http_archive( | ||
name = "bazel_upgradable", | ||
strip_prefix = "bazel_upgradable-0.1.1", | ||
url = "https://github.com/fenollp/bazel_upgradable/archive/0.1.1.zip", | ||
) | ||
|
||
load("@bazel_lock//rules:locked.bzl", "http_archive") | ||
load("//:LOCKFILE.bzl", "locked") | ||
load("@bazel_upgradable//:rule.bzl", "upgradable_repository") | ||
|
||
http_archive( | ||
upgradable_repository( | ||
name = "rules_cc", | ||
locked = locked, | ||
type = "zip", | ||
upgrades_slug = "github.com/bazelbuild/rules_cc", | ||
remote = "git://github.com/bazelbuild/rules_cc.git", | ||
) | ||
|
||
http_archive( | ||
upgradable_repository( | ||
name = "khronos_opengl_registry", | ||
build_file = "@//third_party:gl.BUILD", | ||
locked = locked, | ||
type = "tar.gz", | ||
upgrades_slug = "github.com/KhronosGroup/OpenGL-Registry", | ||
remote = "git://github.com/KhronosGroup/OpenGL-Registry.git", | ||
) | ||
|
||
http_archive( | ||
upgradable_repository( | ||
name = "glfw", | ||
build_file = "@//third_party:glfw3.BUILD", | ||
locked = locked, | ||
type = "zip", | ||
upgrades_slug = "github.com/glfw/glfw", | ||
remote = "git://github.com/glfw/glfw.git", | ||
) | ||
|
||
http_archive( | ||
name = "com_github_gtruc_glm", | ||
upgradable_repository( | ||
name = "glfw_osx", | ||
build_file = "@//third_party:glfw3_osx.BUILD", | ||
release = "glfw-{tag_digits}.bin.MACOS.zip", | ||
remote = "git://github.com/glfw/glfw.git", | ||
strip_prefix = "glfw-{tag_digits}.bin.MACOS", | ||
tag = "~3", | ||
) | ||
|
||
upgradable_repository( | ||
name = "glm", | ||
build_file = "@//third_party:glm.BUILD", | ||
locked = locked, | ||
type = "zip", | ||
upgrades_slug = "github.com/g-truc/glm", | ||
remote = "git://github.com/g-truc/glm.git", | ||
) | ||
|
||
glew_version_constraint = "<=2" | ||
|
||
upgradable_repository( | ||
name = "glew", | ||
build_file = "@//third_party:glew.BUILD", | ||
release = "{tag}.tgz", | ||
remote = "git://github.com/nigels-com/glew.git", | ||
strip_prefix = "glew-{tag_digits}", | ||
tag = glew_version_constraint, | ||
type = "tar.gz", | ||
) | ||
|
||
upgradable_repository( | ||
name = "glew_win64", | ||
build_file = "@//third_party:glew_win64.BUILD", | ||
release = "{tag}-win32.zip", | ||
remote = "git://github.com/nigels-com/glew.git", | ||
strip_prefix = "glew-{tag_digits}", | ||
tag = glew_version_constraint, | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.