-
-
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.
- Loading branch information
1 parent
95be909
commit eb8bc3e
Showing
4 changed files
with
98 additions
and
2 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,58 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
name: Build | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest, windows-latest] | ||
include: | ||
- os: ubuntu-latest | ||
parallel: 2 | ||
build-deps: ./build-deps.sh | ||
artifact: nitro-linux-x86_64 | ||
- os: macos-latest | ||
parallel: 3 | ||
build-deps: ./build-deps.sh | ||
artifact: nitro-mac-x86_64 | ||
- os: windows-latest | ||
parallel: 2 | ||
build-deps: .\build-deps.ps1 | ||
artifact: nitro-win-x86_64 | ||
runs-on: ${{ matrix.os }} | ||
env: | ||
CMAKE_BUILD_PARALLEL_LEVEL: ${{ matrix.parallel }} | ||
steps: | ||
- name: Checkout source | ||
uses: actions/checkout@v4 | ||
with: | ||
submodules: recursive | ||
- name: Restore LLVM | ||
uses: actions/cache/restore@v3 | ||
with: | ||
path: deps/llvm/build | ||
key: ${{ runner.os }}-llvm | ||
- name: Build dependencies | ||
run: ${{ matrix.build-deps }} | ||
- name: Build CLI | ||
run: cargo install --path stage0 --root dist | ||
- name: Cache LLVM | ||
uses: actions/cache/save@v3 | ||
with: | ||
path: deps/llvm/build | ||
key: ${{ runner.os }}-llvm-${{ github.run_id }} | ||
if: startsWith(github.ref, 'refs/heads/') | ||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ matrix.artifact }} | ||
path: | | ||
dist | ||
!dist/.crates.toml | ||
!dist/.crates2.json |
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 |
---|---|---|
@@ -1 +1,2 @@ | ||
/dist/ | ||
/lib/ |
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,25 @@ | ||
# LLVM | ||
cmake ` | ||
--install-prefix "$PSScriptRoot/lib/llvm" ` | ||
-B "$PSScriptRoot/deps/llvm/build" ` | ||
-Wno-dev ` | ||
-DCMAKE_BUILD_TYPE:STRING=Release ` | ||
-DLLVM_ENABLE_ZSTD:BOOL=OFF ` | ||
-DLLVM_APPEND_VC_REV:BOOL=OFF ` | ||
"$PSScriptRoot/deps/llvm/llvm" | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
exit 1 | ||
} | ||
|
||
cmake --build "$PSScriptRoot/deps/llvm/build" --config Release | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
exit 1 | ||
} | ||
|
||
cmake --install "$PSScriptRoot/deps/llvm/build" --config Release | ||
|
||
if ($LASTEXITCODE -ne 0) { | ||
exit 1 | ||
} |