From e910fa2c9d3fbfb71de37c02fc2de7c7de408f7a Mon Sep 17 00:00:00 2001 From: justinwoo Date: Sun, 18 Aug 2019 14:28:48 +0300 Subject: [PATCH] use github actions workflow --- .github/workflows/ci.yml | 19 +++++++++++++++++++ .travis.yml | 4 ---- Makefile | 4 ---- README.md | 2 -- default.nix | 2 -- dhall-json-simple.nix | 27 --------------------------- test.bash | 5 ++--- 7 files changed, 21 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/ci.yml delete mode 100644 .travis.yml delete mode 100644 Makefile delete mode 100644 dhall-json-simple.nix diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..9ccf064 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,19 @@ +name: My Workflow +on: [push] + +jobs: + my_job: + name: My Job on ${{ matrix.os }} + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, macos-latest] + + steps: + - uses: actions/checkout@master + - name: nix + run: | + curl https://nixos.org/nix/install | sh + . "$HOME"/.nix-profile/etc/profile.d/nix.sh + ./test.bash diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index c67294a..0000000 --- a/.travis.yml +++ /dev/null @@ -1,4 +0,0 @@ -sudo: required -dist: trusty -language: nix -script: make diff --git a/Makefile b/Makefile deleted file mode 100644 index c6e4e22..0000000 --- a/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -default: test - -test: - nix-shell --pure --run './test.bash' diff --git a/README.md b/README.md index 67da6a2..ce71e9a 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,5 @@ # Easy Dhall Nix -[![Build Status](https://travis-ci.org/justinwoo/easy-dhall-nix.svg?branch=master)](https://travis-ci.org/justinwoo/easy-dhall-nix) - Derivations for easily downloading Dhall binaries and putting them to use. ## Trial diff --git a/default.nix b/default.nix index 4c012a5..5d5170c 100644 --- a/default.nix +++ b/default.nix @@ -3,7 +3,5 @@ { dhall-simple = import ./dhall-simple.nix { inherit pkgs; }; - dhall-json-simple = import ./dhall-json-simple.nix { inherit pkgs; }; - dhall-bash-simple = import ./dhall-bash-simple.nix { inherit pkgs; }; } diff --git a/dhall-json-simple.nix b/dhall-json-simple.nix deleted file mode 100644 index 6f5f704..0000000 --- a/dhall-json-simple.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ pkgs ? import {} }: - -pkgs.stdenv.mkDerivation rec { - name = "dhall-json-simple"; - - src = if pkgs.stdenv.isDarwin - then pkgs.fetchurl { - url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.25.0/dhall-json-1.4.0-x86_64-macos.tar.bz2"; - sha256 = "0427xy59mzyrz978l36x0ha610bpckg14m3svkvg8hipvblgh19r"; - } - else pkgs.fetchurl { - url = "https://github.com/dhall-lang/dhall-haskell/releases/download/1.25.0/dhall-json-1.4.0-x86_64-linux.tar.bz2"; - sha256 = "14apqq0dj3lmm8yccygf8bb27scxjfkjkmr8zgnwb98znr51gfwn"; - }; - - installPhase = '' - mkdir -p $out/bin - DHALL_TO_JSON=$out/bin/dhall-to-json - DHALL_TO_YAML=$out/bin/dhall-to-yaml - install -D -m555 -T dhall-to-json $DHALL_TO_JSON - install -D -m555 -T dhall-to-yaml $DHALL_TO_YAML - - mkdir -p $out/etc/bash_completion.d/ - $DHALL_TO_JSON --bash-completion-script $DHALL_TO_JSON > $out/etc/bash_completion.d/dhall-to-json-completion.bash - $DHALL_TO_YAML --bash-completion-script $DHALL_TO_YAML > $out/etc/bash_completion.d/dhall-to-yaml-completion.bash - ''; -} diff --git a/test.bash b/test.bash index 87ef4ca..d7da705 100755 --- a/test.bash +++ b/test.bash @@ -1,4 +1,5 @@ -#!/usr/bin/env bash +#!/usr/bin/env nix-shell +#!nix-shell -i bash ERRORS=0; @@ -14,8 +15,6 @@ function test_exe () { } test_exe dhall; -test_exe dhall-to-json; -test_exe dhall-to-yaml; test_exe dhall-to-bash; exit $ERRORS;