From 948e672bd835088692275bd08f920dfbfc627ca7 Mon Sep 17 00:00:00 2001 From: Anton-4 <17049058+Anton-4@users.noreply.github.com> Date: Tue, 26 Sep 2023 14:21:23 +0200 Subject: [PATCH] nixfmt, enable other workflows --- .github/workflows/basic_cli_build_release.yml | 2 +- .github/workflows/benchmarks.yml | 2 +- .../workflows/devtools_test_linux_x86_64.yml | 2 +- .github/workflows/macos_x86_64.yml | 2 +- .github/workflows/markdown_link_check.yml | 2 +- .github/workflows/nix_linux_x86_64.yml | 2 +- .github/workflows/nix_macos_apple_silicon.yml | 2 +- .github/workflows/nix_macos_x86_64.yml | 2 +- .github/workflows/spellcheck.yml | 2 +- .github/workflows/ubuntu_x86_64.yml | 2 +- .github/workflows/windows_release_build.yml | 2 +- .github/workflows/windows_tests.yml | 2 +- devtools/flake.nix | 60 ++++++++++--------- 13 files changed, 45 insertions(+), 39 deletions(-) diff --git a/.github/workflows/basic_cli_build_release.yml b/.github/workflows/basic_cli_build_release.yml index 5605a622d32..01c92664548 100644 --- a/.github/workflows/basic_cli_build_release.yml +++ b/.github/workflows/basic_cli_build_release.yml @@ -1,5 +1,5 @@ on: - ##pull_request: + #pull_request: workflow_dispatch: # this cancels workflows currently in progress if you start a new one diff --git a/.github/workflows/benchmarks.yml b/.github/workflows/benchmarks.yml index b682c6b1f96..4d016a3e3cd 100644 --- a/.github/workflows/benchmarks.yml +++ b/.github/workflows/benchmarks.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Benchmarks diff --git a/.github/workflows/devtools_test_linux_x86_64.yml b/.github/workflows/devtools_test_linux_x86_64.yml index 5f6dab4be1f..a41cc24778f 100644 --- a/.github/workflows/devtools_test_linux_x86_64.yml +++ b/.github/workflows/devtools_test_linux_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Test the devtools nix files diff --git a/.github/workflows/macos_x86_64.yml b/.github/workflows/macos_x86_64.yml index 9b2ffc4d3ce..cb3c7df55d0 100644 --- a/.github/workflows/macos_x86_64.yml +++ b/.github/workflows/macos_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Macos x86-64 rust tests diff --git a/.github/workflows/markdown_link_check.yml b/.github/workflows/markdown_link_check.yml index 42fa2e9099f..1b60da4f8c7 100644 --- a/.github/workflows/markdown_link_check.yml +++ b/.github/workflows/markdown_link_check.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: schedule: - cron: '0 9 * * *' # 9=9am utc+0 diff --git a/.github/workflows/nix_linux_x86_64.yml b/.github/workflows/nix_linux_x86_64.yml index a7cd8f663a9..a3e36423dd9 100644 --- a/.github/workflows/nix_linux_x86_64.yml +++ b/.github/workflows/nix_linux_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Nix linux x86_64 cargo test diff --git a/.github/workflows/nix_macos_apple_silicon.yml b/.github/workflows/nix_macos_apple_silicon.yml index d097bfb2531..c60eff51990 100644 --- a/.github/workflows/nix_macos_apple_silicon.yml +++ b/.github/workflows/nix_macos_apple_silicon.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Nix apple silicon cargo test diff --git a/.github/workflows/nix_macos_x86_64.yml b/.github/workflows/nix_macos_x86_64.yml index b5aa5fed379..7c9e43aa281 100644 --- a/.github/workflows/nix_macos_x86_64.yml +++ b/.github/workflows/nix_macos_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: Nix macOS x86_64 cargo test diff --git a/.github/workflows/spellcheck.yml b/.github/workflows/spellcheck.yml index bbdf5ee4e3a..fb7f9284c0c 100644 --- a/.github/workflows/spellcheck.yml +++ b/.github/workflows/spellcheck.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: SpellCheck diff --git a/.github/workflows/ubuntu_x86_64.yml b/.github/workflows/ubuntu_x86_64.yml index a2f909fe877..bf754c42ebd 100644 --- a/.github/workflows/ubuntu_x86_64.yml +++ b/.github/workflows/ubuntu_x86_64.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: CI diff --git a/.github/workflows/windows_release_build.yml b/.github/workflows/windows_release_build.yml index b47e2930346..fee39a873ab 100644 --- a/.github/workflows/windows_release_build.yml +++ b/.github/workflows/windows_release_build.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: windows - release build diff --git a/.github/workflows/windows_tests.yml b/.github/workflows/windows_tests.yml index a117411ab8c..7b6b5987a88 100644 --- a/.github/workflows/windows_tests.yml +++ b/.github/workflows/windows_tests.yml @@ -1,5 +1,5 @@ on: - #pull_request: + pull_request: name: windows - subset of tests diff --git a/devtools/flake.nix b/devtools/flake.nix index a5f4d9f9c82..3c604b760d3 100755 --- a/devtools/flake.nix +++ b/devtools/flake.nix @@ -9,43 +9,47 @@ let supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" ]; flake-utils = roc.inputs.flake-utils; - in flake-utils.lib.eachSystem supportedSystems (system: + in + flake-utils.lib.eachSystem supportedSystems (system: let pkgs = import roc.inputs.nixpkgs { inherit system; config.allowUnfree = true; }; - + isAarch64Darwin = pkgs.stdenv.hostPlatform.system == "aarch64-darwin"; rocShell = roc.devShell.${system}; - in { + in + { devShell = pkgs.mkShell { - packages = let - devInputs = with pkgs; - [ less bashInteractive ] - ++ (if isAarch64Darwin then [] else [ gdb ]); - - vscodeWithExtensions = pkgs.vscode-with-extensions.override { - vscodeExtensions = with pkgs.vscode-extensions; - [ - matklad.rust-analyzer - # eamodio.gitlens - bbenoist.nix - tamasfe.even-better-toml - ] ++ (if isAarch64Darwin then [] else [ vadimcn.vscode-lldb ]) + packages = + let + devInputs = with pkgs; + [ less bashInteractive ] + ++ (if isAarch64Darwin then [ ] else [ gdb ]); + + vscodeWithExtensions = pkgs.vscode-with-extensions.override { + vscodeExtensions = with pkgs.vscode-extensions; + [ + matklad.rust-analyzer + # eamodio.gitlens + bbenoist.nix + tamasfe.even-better-toml + ] ++ (if isAarch64Darwin then [ ] else [ vadimcn.vscode-lldb ]) ++ pkgs.vscode-utils.extensionsFromVscodeMarketplace [ - { - name = "roc-lang-support"; - publisher = "benjamin-thomas"; - version = "0.0.4"; - # keep this sha for the first run, nix will tell you the correct one to change it to - sha256 = "sha256-USZiXdvYa8hxj62cy6hdiS5c2tIDIQxSyux684lyAEY="; - } - ] - ; - }; - in [ vscodeWithExtensions devInputs ]; + { + name = "roc-lang-support"; + publisher = "benjamin-thomas"; + version = "0.0.4"; + # keep this sha for the first run, nix will tell you the correct one to change it to + sha256 = "sha256-USZiXdvYa8hxj62cy6hdiS5c2tIDIQxSyux684lyAEY="; + } + ] + ; + }; + in + [ vscodeWithExtensions devInputs ]; inputsFrom = [ rocShell ]; @@ -56,6 +60,8 @@ # to set the LLVM_SYS__PREFIX shellHook = rocShell.shellHook; + + formatter = pkgs.nixpkgs-fmt; }; }); }