]> git.wh0rd.org Git - elf2flt.git/commitdiff
tests: run via github actions
authorMike Frysinger <vapier@gentoo.org>
Wed, 13 May 2020 11:14:04 +0000 (07:14 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 13 May 2020 11:20:06 +0000 (07:20 -0400)
It integrates better than Travis.  Still run both for now to compare.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
.github/workflows/build-test-ci.yml [new file with mode: 0644]
.gitignore
travis/main.sh

diff --git a/.github/workflows/build-test-ci.yml b/.github/workflows/build-test-ci.yml
new file mode 100644 (file)
index 0000000..e1c14f6
--- /dev/null
@@ -0,0 +1,33 @@
+# GitHub actions workflow.
+# https://help.github.com/en/actions/automating-your-workflow-with-github-actions/workflow-syntax-for-github-actions
+
+name: Build+Test CI
+
+on:
+  push:
+    branches: [master]
+    tags: [v*]
+  pull_request:
+    types: [opened]
+    branches: [master]
+
+jobs:
+  build-test:
+    strategy:
+      matrix:
+        os: [ubuntu-latest]
+        cc: [gcc]
+    runs-on: ${{ matrix.os }}
+    env:
+      CC: ${{ matrix.cc }}
+    steps:
+    - name: Checkout elf2flt
+      uses: actions/checkout@v2
+      with:
+        path: elf2flt
+    - name: Checkout prebuilt binutils
+      uses: actions/checkout@v2
+      with:
+        repository: uclinux-dev/prebuilts-binutils-libs
+        path: prebuilts-binutils-libs
+    - run: cd elf2flt && ./travis/main.sh
index cdb96e4adbc05cbc336ceba1baee22608adb7f43..e601422b893797edbc981889786e67b4241c3aa3 100644 (file)
@@ -23,6 +23,7 @@ config.status
 Makefile
 
 # our generated files
+/build/
 /elf2flt
 /elf2flt.ld
 /flthdr
index d6d81f95f7bbcaa06f1acd9541c66f9981cac488..63a1856d269bc9c7fec286d25bc83b8bb30e991c 100755 (executable)
@@ -36,8 +36,10 @@ build_one() {
 }
 
 main() {
-       v --fold="git_clone_binutils" \
-               git clone --depth=1 https://github.com/uclinux-dev/prebuilts-binutils-libs ../prebuilts-binutils-libs
+       if [[ ! -d ../prebuilts-binutils-libs ]] ; then
+               v --fold="git_clone_binutils" \
+                       git clone --depth=1 https://github.com/uclinux-dev/prebuilts-binutils-libs ../prebuilts-binutils-libs
+       fi
 
        local a b
        for a in "${ARCHES[@]}" ; do