mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-13 10:01:56 +00:00
added workflow to test devtools nix files
This commit is contained in:
parent
356d3abc30
commit
a93f62c196
2 changed files with 43 additions and 2 deletions
41
.github/workflows/devtools_test.yml
vendored
Normal file
41
.github/workflows/devtools_test.yml
vendored
Normal file
|
|
@ -0,0 +1,41 @@
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
|
||||||
|
name: Test the devtools nix files
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
devtools-test:
|
||||||
|
name: devtools-test
|
||||||
|
runs-on: [ubuntu-20.04]
|
||||||
|
timeout-minutes: 120
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
# TODO only run if flake.lock changed
|
||||||
|
|
||||||
|
- name: test devtools/flake.nix
|
||||||
|
id: devtools_test_step
|
||||||
|
run: |
|
||||||
|
echo "ROC_FOLDER=$(realpath .)" >> $GITHUB_ENV
|
||||||
|
mkdir -p ../temp
|
||||||
|
cp devtools/flake.nix ../temp
|
||||||
|
cp devtools/flake.lock ../temp
|
||||||
|
cd ../temp
|
||||||
|
git init
|
||||||
|
git add flake.nix flake.lock
|
||||||
|
sed -i 's|/home/username/gitrepos/roc|${{ env.ROC_FOLDER }}|g' flake.nix
|
||||||
|
nix develop
|
||||||
|
|
||||||
|
- name: Print tip on fail
|
||||||
|
if: steps.devtools_test_step.outcome == 'failure'
|
||||||
|
run: |
|
||||||
|
echo "The devtools test failed, this can likely be fixed by"
|
||||||
|
echo "locally deleting devtools/flake.lock and following the"
|
||||||
|
echo "instructions in devtools/README.md. This will create a"
|
||||||
|
echo "new flake.lock you should use to replace the old devtools/flake.lock"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -7,9 +7,9 @@ The flake in this folder is meant for vscode, feel free to create a PR if you'li
|
||||||
|
|
||||||
Further steps:
|
Further steps:
|
||||||
|
|
||||||
1. Copy the flake.nix and flake.lock file to a new folder outside of the roc repo folder.
|
1. Copy the flake.nix and flake.lock file from the devtools folder to a new folder outside of the roc repo folder.
|
||||||
1. Run `git init` in the new folder.
|
1. Run `git init` in the new folder.
|
||||||
1. Execute `git add flake.nix`, nix will error if you don't do this.
|
1. Execute `git add flake.nix flake.lock`, nix will error if you don't do this.
|
||||||
1. Change `roc.url = "path:/home/anton/gitrepos/roc";` to the location of the roc folder on your machine.
|
1. Change `roc.url = "path:/home/anton/gitrepos/roc";` to the location of the roc folder on your machine.
|
||||||
1. Follow instructions about vscode extensions [here](#extensions).
|
1. Follow instructions about vscode extensions [here](#extensions).
|
||||||
1. add other dev tools you like in the `devInputs` list. You can search for those [here](https://search.nixos.org/packages).
|
1. add other dev tools you like in the `devInputs` list. You can search for those [here](https://search.nixos.org/packages).
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue