diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..04d718a --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +name: V8 Build CI + +on: + workflow_dispatch: + +jobs: + build: + runs-on: windows-2022 + + steps: + - name: Support longpaths + run: git config --global core.longpaths true + + - name: Checkout code + uses: actions/checkout@v3 + with: + submodules: 'recursive' + + - name: Prepare Depot and build V8 + working-directory: ${{ github.workspace }} + run: | + .\build\prepare-depot.ps1 && .\build\build.ps1 + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: release_build + path: build_results/*.lib + + - name: Create draft release + uses: softprops/action-gh-release@v2 + with: + draft: true + name: ${{ format('build-{0}', github.run_id) }} + tag_name: ${{ format('build-{0}', github.run_id) }} + files: build_results/*.lib diff --git a/build/build.ps1.bak b/build/build.ps1.bak deleted file mode 100644 index c3c3c81..0000000 --- a/build/build.ps1.bak +++ /dev/null @@ -1,35 +0,0 @@ -# Define environment variables -$env:DEPOT_TOOLS_WIN_TOOLCHAIN = "0" - -# Get the current directory of the script -$CURRENT_DIR = Split-Path -Parent $MyInvocation.MyCommand.Path -Write-Host "Current directory: $CURRENT_DIR" - -# Define the directory to be mounted -$MOUNT_DIR = Split-Path -Path $CURRENT_DIR -Parent -$MOUNT_TARGET_DRIVE = "Y" -Write-Host "Mount directory: $MOUNT_DIR" - -Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: /D" -ErrorAction SilentlyContinue -Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: $MOUNT_DIR" -ErrorAction SilentlyContinue - -# Reading target commit hash -$COMMIT = Get-Content "${MOUNT_TARGET_DRIVE}:\build\target_commit.txt " -Raw - -# Fetch v8 source -& fetch v8 -New-Item -ItemType Directory -Force -Path "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.release" -New-Item -ItemType Directory -Force -Path "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.debug" -Copy-Item -Path "${MOUNT_TARGET_DRIVE}:\build\args_debug.gn" -Destination "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.debug\args.gn" -Copy-Item -Path "${MOUNT_TARGET_DRIVE}:\build\args_release.gn" -Destination "${MOUNT_TARGET_DRIVE}:\v8\out.gn\x64.release\args.gn" -Set-Location "${MOUNT_TARGET_DRIVE}:\v8" -git checkout $COMMIT -gclient sync -gn gen out.gn/x64.debug -ninja -C out.gn/x64.debug -j16 v8_monolith - -gn gen out.gn/x64.release -ninja -C out.gn/x64.release -j16 v8_monolith - -# Attempt to clean up and remove X: mapping at the end; ignore errors -Invoke-Expression "subst ${MOUNT_TARGET_DRIVE}: /D" -ErrorAction SilentlyContinue