summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong He <yonghe@outlook.com>2020-11-17 12:03:45 -0800
committerGitHub <noreply@github.com>2020-11-17 12:03:45 -0800
commitbdc589b0b1360cd06c48f88a117c55e84198ab23 (patch)
treec7e78e4a0347550ea657cf1c0cd5339283c01786
parent7dd0ff9d08ca8b5f86f2a71afaa94d625c6ad64e (diff)
Switch CI to github actions. (#1609)
* Remove travis config files * change github build script * skip non-tag build on appveyor
-rw-r--r--.travis.yml66
-rw-r--r--appveyor.yml2
-rw-r--r--github_build.sh4
-rw-r--r--travis_build.sh17
-rw-r--r--travis_test.sh19
5 files changed, 3 insertions, 105 deletions
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index f53e2e5db..000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,66 +0,0 @@
-# .travis.yml
-#
-# This is the configuration file to drive Travis CI for Slang.
-
-language: cpp
-
-env:
- - SLANG_TEST_FLAGS=-travis
-
-# Build and test (clang, gcc) x (debug, release)
-#
-# We customize the set of tests run per-target to
-# avoid having the build take too long.
-matrix:
- include:
- - os: linux
- compiler: gcc
- env:
- - CONFIGURATION=debug
- - SLANG_TEST_CATEGORY=smoke
- - os: linux
- compiler: clang
- env:
- - CONFIGURATION=debug
- - SLANG_TEST_CATEGORY=smoke
- - os: linux
- compiler: clang
- env:
- - CONFIGURATION=release
- - SLANG_TEST_CATEGORY=smoke
- - os: linux
- compiler: gcc
- env:
- - CONFIGURATION=release
- - SLANG_TEST_CATEGORY=full
- - SLANG_DEPLOY=true
-
-# Travis wants to default to a build script that invokes
-# `./configure && make && make test` which is appropriate
-# for autoconf, but I don't want to get into that mess..
-#
-script: bash ./travis_build.sh && bash ./travis_test.sh
-
-before_deploy: |
- export SLANG_OS_NAME=${TRAVIS_OS_NAME}
- export SLANG_ARCH_NAME=`uname -p`
- export SLANG_TAG=${TRAVIS_TAG#v}
- export SLANG_BINARY_ARCHIVE=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.zip
- export SLANG_BINARY_ARCHIVE_TAR=slang-${SLANG_TAG}-${SLANG_OS_NAME}-${SLANG_ARCH_NAME}.tar.gz
- zip -r ${SLANG_BINARY_ARCHIVE} bin/*/*/slangc bin/*/*/libslang.so bin/*/*/libslang-glslang.so docs/*.md README.md LICENSE slang.h slang-com-helper.h slang-com-ptr.h slang-tag-version.h prelude/*.h
- tar -czf ${SLANG_BINARY_ARCHIVE_TAR} bin/*/*/slangc bin/*/*/libslang.so bin/*/*/libslang-glslang.so docs/*.md README.md LICENSE slang.h slang-com-helper.h slang-com-ptr.h slang-tag-version.h prelude/*.h
-
-# We are going to deploy to GitHub Releases
-# on a successful build from a tag, but only
-# on the one target in the build matrix that set
-# `SLANG_DEPLOY`
-deploy:
- provider: releases
- api_key: "$GITHUB_RELEASE_TOKEN"
- file:
- - "$SLANG_BINARY_ARCHIVE"
- - "$SLANG_BINARY_ARCHIVE_TAR"
- skip_cleanup: true
- on:
- condition: "$SLANG_DEPLOY = true"
- tags: true
diff --git a/appveyor.yml b/appveyor.yml
index dccb892e9..0c3e0f4b1 100644
--- a/appveyor.yml
+++ b/appveyor.yml
@@ -1,6 +1,6 @@
# Our solution file is currently set up for VS2015
image: Visual Studio 2015
-
+skip_non_tags: true
init:
# Construct a version number suitable for using as a release name
- ps: >-
diff --git a/github_build.sh b/github_build.sh
index 78a4d4211..445b04b19 100644
--- a/github_build.sh
+++ b/github_build.sh
@@ -6,11 +6,11 @@ chmod u+x premake5
# generate slang-tag-version.h
git describe --tags | sed -e "s/\(.*\)/\#define SLANG_TAG_VERSION \"\1\"/" > slang-tag-version.h
cat slang-tag-version.h
-
+
# Create the makefile
./premake5 gmake --cc=${CC}
# Build the configuration
-make config=${CONFIGURATION}_x64 -j2
+make config=${CONFIGURATION}_x64 -j`nproc`
diff --git a/travis_build.sh b/travis_build.sh
deleted file mode 100644
index 82ac8788b..000000000
--- a/travis_build.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/usr/bin/env bash
-
-# Get premake
-wget https://github.com/shader-slang/slang-binaries/blob/master/premake/premake-5.0.0-alpha13/bin/linux-64/premake5?raw=true -O premake5
-chmod u+x premake5
-
-# generate slang-tag-version.h
-git describe --tags | sed -e "s/\(.*\)/\#define SLANG_TAG_VERSION \"\1\"/" > slang-tag-version.h
-cat slang-tag-version.h
-
-# Create the makefile
-./premake5 gmake --cc=${CC}
-
-# Build the configuration
-make config=${CONFIGURATION}_x64
-
-
diff --git a/travis_test.sh b/travis_test.sh
deleted file mode 100644
index add6a5d24..000000000
--- a/travis_test.sh
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env bash
-
-# CONFIGURATION=release or debug
-# SLANG_TEST_CATEGORY=
-
-PLATFORM=$(uname -s | tr '[:upper:]' '[:lower:]')
-ARCHITECTURE=$(uname -p)
-
-if [ "${ARCHITECTURE}" == "x86_64" ]; then
- ARCHITECTURE="x64"
-fi
-
-TARGET=${PLATFORM}-${ARCHITECTURE}
-
-OUTPUTDIR=bin/${TARGET}/${CONFIGURATION}/
-
-SLANG_TEST=${OUTPUTDIR}slang-test
-
-${SLANG_TEST} -bindir ${OUTPUTDIR} -travis -category ${SLANG_TEST_CATEGORY} ${SLANG_TEST_FLAGS}