Skip to content

Commit

Permalink
Move from travis to actions (#389)
Browse files Browse the repository at this point in the history
* darwin: remove gcc packages

* travis: remove travis branch

* darwin: try sudo true

* actions: initial attempt

* actions: bye travis
  • Loading branch information
smunix committed Jan 22, 2021
1 parent 310b493 commit 5d2e4f5
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 165 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: "Build"
on:
pull_request:
jobs:
# clang-8-darwin:
# runs-on: macos-11.0
# steps:
# - uses: actions/checkout@v2
# with:
# # Nix Flakes doesn't work on shallow clones
# fetch-depth: 0
# - uses: cachix/install-nix-action@v12
# with:
# install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
# extra_nix_config: |
# experimental-features = nix-command flakes ca-references
# - run: |
# nix build .#hobbesPackages/clang-8/hobbes
clang-8-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v12
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
extra_nix_config: |
experimental-features = nix-command flakes ca-references
- run: |
nix build .#hobbesPackages/clang-8/hobbes
gcc-10-llmv-8-linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
# Nix Flakes doesn't work on shallow clones
fetch-depth: 0
- uses: cachix/install-nix-action@v12
with:
install_url: https://github.com/numtide/nix-flakes-installer/releases/download/nix-2.4pre20201221_9fab14a/install
extra_nix_config: |
experimental-features = nix-command flakes ca-references
- run: |
nix build .#hobbesPackages/gcc-10/llvm-8/hobbes
164 changes: 0 additions & 164 deletions .travis.yml

This file was deleted.

5 changes: 4 additions & 1 deletion nix/overlays.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ let

linuxOnly = v : if system == "x86_64-linux" then v else {};

when = c: m: if c then m else {};

withGCC = { gccVersion ? 10 }:
let gccPkgs = { gccVersion }: builtins.getAttr ("gcc" + (toString gccVersion) + "Stdenv") final;
llvmPkgs = { llvmVersion }: builtins.getAttr ("llvmPackages_" + (toString llvmVersion)) final;
Expand All @@ -63,7 +65,8 @@ let
--replace "\''${CMAKE_SOURCE_DIR}" "${src}"
'';
});
in { hobbesPackages = linuxOnly (recurseIntoAttrs (builtins.listToAttrs (builtins.map (gccConstraint: {

in { hobbesPackages = when stdenv.isLinux (recurseIntoAttrs (builtins.listToAttrs (builtins.map (gccConstraint: {
name = "gcc-" + toString gccConstraint.gccVersion;
value = recurseIntoAttrs (builtins.listToAttrs (builtins.map (llvmVersion: {
name = "llvm-" + toString llvmVersion;
Expand Down

0 comments on commit 5d2e4f5

Please sign in to comment.