-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add simple wrapper for the threading API (#1)
- Loading branch information
Showing
10 changed files
with
1,014 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
pull_request: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-node@v1 | ||
with: | ||
node-version: "22" | ||
|
||
- name: Install Nix | ||
uses: DeterminateSystems/nix-installer-action@v12 | ||
- uses: DeterminateSystems/magic-nix-cache-action@main | ||
|
||
- name: Setup PureScript dependencies | ||
run: npm i --global [email protected] spago@next purescm@latest | ||
|
||
- name: Build source | ||
run: spago build | ||
|
||
- name: Cache PureScript dependencies | ||
uses: actions/cache@v2 | ||
with: | ||
key: ${{ runner.os }}-spago-${{ hashFiles('**/spago.yaml') }} | ||
path: | | ||
.spago | ||
output | ||
- name: Run tests | ||
run: | | ||
nix-shell --run "purescm run --main Test.Chez.Main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
|
||
bower_components/ | ||
node_modules/ | ||
.pulp-cache/ | ||
output/ | ||
output-es/ | ||
generated-docs/ | ||
.psc-package/ | ||
.psc* | ||
.purs* | ||
.psa* | ||
.spago | ||
.envrc | ||
.direnv |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
{ | ||
description = "PureScript core packages CI setup"; | ||
|
||
inputs = { | ||
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; | ||
|
||
flake-compat = { | ||
url = "github:edolstra/flake-compat"; | ||
flake = false; | ||
}; | ||
|
||
purescript-overlay.url = "github:thomashoneyman/purescript-overlay"; | ||
purescript-overlay.inputs.nixpkgs.follows = "nixpkgs"; | ||
}; | ||
|
||
outputs = { self, nixpkgs, ... }@inputs: | ||
let | ||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; | ||
|
||
forAllSystems = nixpkgs.lib.genAttrs supportedSystems; | ||
|
||
nixpkgsFor = forAllSystems (system: import nixpkgs { | ||
inherit system; | ||
overlays = builtins.attrValues self.overlays; | ||
}); | ||
in | ||
{ | ||
overlays = { | ||
purescript = inputs.purescript-overlay.overlays.default; | ||
}; | ||
|
||
devShells = forAllSystems (system: | ||
let pkgs = nixpkgsFor.${system}; | ||
chez = pkgs.chez.overrideAttrs (final: prev: { | ||
postFixup = if pkgs.stdenv.isDarwin then '' | ||
install_name_tool -add_rpath ${pkgs.pcre2.out}/lib $out/bin/scheme | ||
'' | ||
else '' | ||
patchelf $out/bin/scheme --add-rpath ${pkgs.pcre2.out}/lib | ||
''; | ||
}); | ||
in { | ||
default = pkgs.mkShell { | ||
name = "purescm"; | ||
packages = with pkgs; [ | ||
chez | ||
]; | ||
}; | ||
}); | ||
|
||
formatter = forAllSystems (system: nixpkgsFor.${system}.nixpkgs-fmt); | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# A compatibility file that allows non-flakes users to still get a development | ||
# shell with `nix-shell`. | ||
(import | ||
( | ||
let lock = builtins.fromJSON (builtins.readFile ./flake.lock); | ||
in fetchTarball { | ||
url = | ||
"https://github.com/edolstra/flake-compat/archive/${lock.nodes.flake-compat.locked.rev}.tar.gz"; | ||
sha256 = lock.nodes.flake-compat.locked.narHash; | ||
} | ||
) | ||
{ src = ./.; }).shellNix | ||
|
Oops, something went wrong.