From f82a7e7ce1831ac2c8b0d6f120da7db4fd2b8953 Mon Sep 17 00:00:00 2001 From: Marcin Szamotulski Date: Sun, 18 Oct 2020 11:34:03 +0200 Subject: [PATCH] Use github-actions Also removed circle ci configuration. --- .circleci/config.yml | 85 ------------------------------------- .github/workflows/posix.yml | 33 ++++++++++++++ 2 files changed, 33 insertions(+), 85 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/posix.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 452afd2..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,85 +0,0 @@ -version: 2.1 -defaults: &defaults - docker: - - image: nixorg/nix:circleci - environment: - - USER: coot -commands: - setup: - description: "setup environment" - steps: - - run: - name: "nix" - command: | - nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs - nix-channel --update - - run: - name: "install" - command: | - nix-env -f "" -iA cachix -f https://cachix.org/api/v1/install - nix-env -f "" -i openssh - nix-env -f "" -i git - - run: - name: "cachix" - command: | - cachix use iohk - cachix use free-algebras - - checkout - cachix-push: - description: "cachix push" - parameters: - o: - type: string - default: "./result" - steps: - - run: - name: "cachix push" - command: cachix push free-algebras << parameters.o >> -jobs: - GHC8101: - <<: *defaults - steps: - - setup - - run: - name: "GHC 8.10.1" - command: | - nix-build -A free-category.components.all --argstr compiler ghc8101 -o result-fc - nix-build -A examples.components.all --argstr compiler ghc8101 -o result-ex - - cachix-push: - o: "./result-fc" - - cachix-push: - o: "./result-ex" - GHC883: - <<: *defaults - steps: - - setup - - run: - name: "GHC 8.8.3" - command: | - nix-build -A free-category.components.all --argstr compiler ghc883 -o result-fc - nix-build -A examples.components.all --argstr compiler ghc883 -o result-ex - - cachix-push: - o: "./result-fc" - - cachix-push: - o: "./result-ex" - GHC865: - <<: *defaults - steps: - - setup - - run: - name: "GHC 8.6.5" - command: | - nix-build -A free-category.components.all --argstr compiler ghc865 -o result-fc - nix-build -A examples.components.all --argstr compiler ghc865 -o result-ex - - cachix-push: - o: result-fc - - cachix-push: - o: result-ex - -workflows: - build: - jobs: - - GHC8101 - - GHC883 - - GHC865 - diff --git a/.github/workflows/posix.yml b/.github/workflows/posix.yml new file mode 100644 index 0000000..06b3a27 --- /dev/null +++ b/.github/workflows/posix.yml @@ -0,0 +1,33 @@ +name: "POSIX" +on: [push] + +jobs: + tests: + name: "free-category" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: cachix/install-nix-action@v10 + - name: "cachix" + uses: cachix/cachix-action@v6 + with: + name: "free-category" + signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' + + - name: "nix" + run: | + echo 'substituters = https://hydra.iohk.io/' | sudo tee -a /etc/nix/nix.conf + echo 'trusted-public-keys = hydra.iohk.io:f/Ea+s+dFdN+3Y/G+FDgSq+a5NEWhJGzdjvKNGv0/EQ=' | sudo tee -a /etc/nix/nix.conf + + - name: "cachix iohk" + run: cachix use iohk + + - name: "[GHC 8.6.5] free-category" + run: | + nix-build default.nix --argstr compiler ghc865 -A free-category + + - name: "[GHC 8.8.4] free-category" + run: nix-build default.nix --argstr compiler ghc884 -A free-category + + - name: "[GHC 8.10.2] free-category" + run: nix-build default.nix --argstr compiler ghc8102 -A free-category