-
-
Notifications
You must be signed in to change notification settings - Fork 113
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(silo): Initial Silo scaffolding
- Loading branch information
Showing
100 changed files
with
5,216 additions
and
34 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
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
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
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,92 @@ | ||
name: (native) Silo build and test | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
os: | ||
description: Operating system to run CI on | ||
type: string | ||
required: true | ||
|
||
jobs: | ||
build: | ||
name: (native) Silo build and test | ||
runs-on: ${{ inputs.os }} | ||
|
||
steps: | ||
- name: Checkout project | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup node.js | ||
uses: actions/setup-node@v3.6.0 | ||
with: | ||
node-version: ">=18.15 <19" | ||
check-latest: true | ||
cache: "npm" | ||
|
||
- name: Install npm dependencies | ||
run: | | ||
npm ci | ||
- name: Esy cache | ||
id: esy-cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
# Not including all paths appears to cause cache misses, so we include the compiler cache as well | ||
path: | | ||
compiler/_export | ||
silo/_export | ||
key: ${{ runner.os }}-esy-${{ hashFiles('compiler/esy.lock/index.json', 'silo/esy.lock/index.json') }} | ||
|
||
- name: Esy setup | ||
# Don't crash the run if esy cache import fails - mostly happens on Windows | ||
continue-on-error: true | ||
run: | | ||
npm run silo install-dependencies | ||
npm run silo import-dependencies | ||
- name: Build silo | ||
run: | | ||
npm run silo build | ||
- name: Download grainc artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: native-build-artifacts-${{ runner.os }}-${{ runner.arch }} | ||
path: bin | ||
|
||
- name: Untar download | ||
working-directory: bin | ||
run: | | ||
tar -xvf native_artifacts.tar | ||
- name: Copy silo executable | ||
run: | | ||
cp cli/bin/silo.exe bin | ||
- name: Add artifacts to PATH (windows) | ||
if: ${{ inputs.os == 'windows-latest' }} | ||
working-directory: bin | ||
run: pwd | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append | ||
|
||
- name: Add artifacts to PATH (unix) | ||
if: ${{ inputs.os != 'windows-latest' }} | ||
working-directory: bin | ||
run: | | ||
mv grainc.exe grainc | ||
mv graindoc.exe graindoc | ||
mv grainformat.exe grainformat | ||
mv grainlsp.exe grainlsp | ||
mv silo.exe silo | ||
echo $(pwd) >> $GITHUB_PATH | ||
- name: Run tests | ||
run: | | ||
npm run silo test | ||
# Check formatting last because building is more important | ||
- name: (silo) Check formatting | ||
if: inputs.os != 'windows-latest' | ||
run: | | ||
npm run silo check-format |
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
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
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
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,3 @@ | ||
_esy | ||
node_modules | ||
test/output |
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,10 @@ | ||
{ | ||
"files.associations": { | ||
"*.dyp": "ocaml.ocamllex", | ||
"CODEOWNERS": "ignore" | ||
}, | ||
"ocaml.sandbox": { | ||
"kind": "esy", | ||
"root": "${workspaceFolder:silo}" | ||
} | ||
} |
Oops, something went wrong.