diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..0571e93 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,25 @@ +name: ci +on: + push: + branches: + - master + pull_request: +jobs: + build: + strategy: + matrix: + os: + - ubuntu-latest + - macos-10.15 + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v2.3.4 + name: Checkout + - uses: cachix/install-nix-action@v13 + name: Install Nix + - uses: cachix/cachix-action@v10 + name: Set up Cachix + with: + name: awakesecurity + authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' + - run: nix-build --attr grpc-haskell diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index da64c63..0000000 --- a/.travis.yml +++ /dev/null @@ -1,2 +0,0 @@ -language: nix -script: nix-build --attr grpc-haskell release.nix diff --git a/default.nix b/default.nix deleted file mode 100644 index aaf4569..0000000 --- a/default.nix +++ /dev/null @@ -1,27 +0,0 @@ -{ mkDerivation, async, base, bytestring, clock, containers -, criterion, grpc-haskell-core, managed, pipes, proto3-suite -, proto3-wire, QuickCheck, random, safe, stdenv, tasty, tasty-hunit -, tasty-quickcheck, text, time, transformers, turtle, unix -}: -mkDerivation { - pname = "grpc-haskell"; - version = "0.0.2.0"; - src = ./.; - isLibrary = true; - isExecutable = true; - libraryHaskellDepends = [ - async base bytestring grpc-haskell-core managed proto3-suite - proto3-wire - ]; - testHaskellDepends = [ - async base bytestring clock containers managed pipes proto3-suite - QuickCheck safe tasty tasty-hunit tasty-quickcheck text time - transformers turtle unix - ]; - benchmarkHaskellDepends = [ - async base bytestring criterion proto3-suite random - ]; - homepage = "https://github.com/awakenetworks/gRPC-haskell"; - description = "Haskell implementation of gRPC layered on shared C library"; - license = stdenv.lib.licenses.asl20; -} diff --git a/default.nix b/default.nix new file mode 120000 index 0000000..ca14ab7 --- /dev/null +++ b/default.nix @@ -0,0 +1 @@ +release.nix \ No newline at end of file diff --git a/release.nix b/release.nix index 45d8be5..8d8542a 100644 --- a/release.nix +++ b/release.nix @@ -22,12 +22,6 @@ # rebuild the repository from scratch every time, which is extremely slow. Only # do this if you want to exactly reproduce our continuous integration build. # -# If you update the `grpc-haskell.cabal` file (such as changing dependencies or -# adding new library/executable/test/benchmark sections), then update the -# `default.nix` expression by running: -# -# $ cabal2nix . > default.nix -# # By default, Nix will pick a version for each one of your Haskell dependencies. # If you would like to select a different version then, run: # @@ -107,13 +101,13 @@ let grpc-haskell-no-tests = pkgsNew.haskell.lib.buildFromSdist (pkgsNew.usesGRPC (pkgsNew.haskell.lib.dontCheck - (haskellPackagesNew.callPackage ./default.nix { }) + (haskellPackagesNew.callCabal2nix "grpc-haskell" ./. { }) )); grpc-haskell = pkgsNew.usesGRPC (pkgsNew.haskell.lib.overrideCabal - (pkgsNew.haskell.lib.buildFromSdist ((haskellPackagesNew.callPackage ./default.nix { }))) + (pkgsNew.haskell.lib.buildFromSdist (haskellPackagesNew.callCabal2nix "grpc-haskell" ./. { })) (oldDerivation: let ghc =