|
1 | 1 | name: Create Release/Upload Asset |
2 | 2 |
|
3 | 3 | on: |
4 | | - workflow_dispatch: |
5 | 4 | push: |
6 | 5 | # Sequence of patterns matched against refs/tags |
7 | 6 | tags: |
|
21 | 20 | jobs: |
22 | 21 | build_on_windows: |
23 | 22 | name: Create/Upload Release Asset (Windows) |
24 | | - runs-on: windows-latest |
| 23 | + runs-on: windows-2025-vs2026 |
25 | 24 | steps: |
26 | 25 | - name: Checkout code |
27 | 26 | uses: actions/checkout@v4 |
@@ -346,178 +345,8 @@ jobs: |
346 | 345 | path: tsc.tar.gz |
347 | 346 | retention-days: 1 |
348 | 347 |
|
349 | | - build_on_linux_ub20: |
350 | | - name: Create/Upload Release Asset (Ubuntu 20.04) |
351 | | - |
352 | | - # The CMake configure and build commands are platform agnostic and should work equally |
353 | | - # well on Windows or Mac. You can convert this to a matrix build if you need |
354 | | - # cross-platform coverage. |
355 | | - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
356 | | - runs-on: ubuntu-20.04 |
357 | | - |
358 | | - steps: |
359 | | - - uses: actions/checkout@v4 |
360 | | - |
361 | | - - name: Cache Build 3rd Party |
362 | | - id: cache-3rd-party |
363 | | - uses: actions/cache@v4 |
364 | | - with: |
365 | | - path: __build/llvm/ninja |
366 | | - key: ${{ runner.os }}-build-llvm-${{ env.LLVM_VERSION }}-ub20-${{ env.CACHE_VERSION }} |
367 | | - |
368 | | - - name: Cache 3rd Party binaries |
369 | | - id: cache-3rd-party-binary |
370 | | - uses: actions/cache@v4 |
371 | | - with: |
372 | | - path: 3rdParty |
373 | | - key: ${{ runner.os }}-3rd-party-${{ env.LLVM_VERSION }}-ub20-${{ env.CACHE_VERSION }} |
374 | | - |
375 | | - - name: Cache 3rd Party binaries - LLVM ${{ env.LLVM_VERSION }} Release |
376 | | - id: cache-3rd-party-binary-llvm-release |
377 | | - uses: actions/cache@v4 |
378 | | - with: |
379 | | - path: llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz |
380 | | - key: ${{ runner.os }}-3rd-party-llvm-${{ env.LLVM_VERSION }}-release-ub20-${{ env.CACHE_VERSION }} |
381 | | - |
382 | | - - name: Retrieve version |
383 | | - run: echo "TAG_NAME=$(git describe --abbrev=0 --tags)" >> $GITHUB_OUTPUT |
384 | | - id: version |
385 | | - |
386 | | - - name: Delete __Build TS folders |
387 | | - continue-on-error: true |
388 | | - run: rm -R ./__build/tsc/ninja/release |
389 | | - shell: sh |
390 | | - |
391 | | - - name: Create __Build Folders |
392 | | - run: mkdir -p ./__build/tsc/ninja/release; mkdir -p ./__build/gc/ninja/release |
393 | | - shell: sh |
394 | | - |
395 | | - - name: Download 3rd party - LLVM |
396 | | - continue-on-error: true |
397 | | - shell: sh |
398 | | - run: | |
399 | | - if test ! -f "llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz"; then |
400 | | - curl --insecure -L "${{ env.LLVM_UB20_TARGZFILE }}" --output llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz |
401 | | - fi |
402 | | -
|
403 | | - - name: UnZip 3rd party - LLVM |
404 | | - continue-on-error: false |
405 | | - shell: sh |
406 | | - run: | |
407 | | - if test -f "llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz"; then |
408 | | - file llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz; mkdir -p ./3rdParty/llvm; tar -xf llvm_${{ env.LLVM_VERSION }}_release_UB20.tgz -C ./3rdParty/llvm/ |
409 | | - fi |
410 | | -
|
411 | | - - name: Download 3rd party source - GC |
412 | | - continue-on-error: true |
413 | | - shell: sh |
414 | | - run: curl --insecure -L https://github.com/bdwgc/bdwgc/releases/download/v${{ env.GC_VERSION }}/gc-${{ env.GC_VERSION }}.tar.gz --output gc-${{ env.GC_VERSION }}.tar.gz |
415 | | - |
416 | | - - name: Download 3rd party source - GC:Atomic_ops |
417 | | - continue-on-error: true |
418 | | - shell: sh |
419 | | - run: curl --insecure -L https://github.com/bdwgc/libatomic_ops/releases/download/v${{ env.LIBATOMIC_OPS_VERSION }}/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz --output libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz |
420 | | - |
421 | | - - name: UnZip 3rd party source - GC |
422 | | - continue-on-error: false |
423 | | - shell: sh |
424 | | - run: tar -xvzf gc-${{ env.GC_VERSION }}.tar.gz -C ./3rdParty/ |
425 | | - |
426 | | - - name: UnZip 3rd party source - GC:Atomic_ops |
427 | | - continue-on-error: false |
428 | | - shell: sh |
429 | | - run: tar -xvzf libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}.tar.gz -C ./3rdParty/ |
430 | | - |
431 | | - - name: Copy Atomic_ops to GC |
432 | | - continue-on-error: false |
433 | | - shell: sh |
434 | | - run: cp -a ./3rdParty/libatomic_ops-${{ env.LIBATOMIC_OPS_VERSION }}/ ./3rdParty/gc-${{ env.GC_VERSION }}/libatomic_ops/ |
435 | | - |
436 | | - - name: Install Ninja |
437 | | - continue-on-error: false |
438 | | - shell: sh |
439 | | - run: sudo apt install ninja-build |
440 | | - |
441 | | - # - name: Install Clang 12 |
442 | | - # continue-on-error: false |
443 | | - # shell: sh |
444 | | - # run: sudo apt install clang-12 |
445 | | - |
446 | | - - name: Configure GC |
447 | | - continue-on-error: false |
448 | | - working-directory: ${{github.workspace}}/__build/gc/ninja/release |
449 | | - shell: sh |
450 | | - run: cmake ../../../../3rdParty/gc-${{ env.GC_VERSION }} -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -Wno-dev -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/3rdParty/gc/release -DBUILD_SHARED_LIBS=OFF -Denable_threads=ON -Denable_cplusplus=OFF -Denable_docs=OFF |
451 | | - |
452 | | - - name: Build GC |
453 | | - continue-on-error: false |
454 | | - working-directory: ${{github.workspace}}/__build/gc/ninja/release |
455 | | - shell: sh |
456 | | - run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 8 |
457 | | - |
458 | | - - name: Install GC |
459 | | - continue-on-error: false |
460 | | - working-directory: ${{github.workspace}}/__build/gc/ninja/release |
461 | | - shell: sh |
462 | | - # Generates the BDWgc CMake package files (lib/cmake/bdwgc/BDWgcConfig.cmake) |
463 | | - # that the tsc build looks up via find_package(BDWgc CONFIG). |
464 | | - run: cmake --install . --config ${{ env.BUILD_TYPE }} |
465 | | - |
466 | | - - name: Configure |
467 | | - continue-on-error: false |
468 | | - working-directory: ${{github.workspace}}/__build/tsc/ninja/release |
469 | | - shell: sh |
470 | | - run: cmake ../../../../tsc -G "Ninja" -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DTSC_PACKAGE_VERSION:STRING="${{ steps.version.outputs.TAG_NAME }}" -Wno-dev |
471 | | - |
472 | | - - name: Build |
473 | | - continue-on-error: false |
474 | | - working-directory: ${{github.workspace}}/__build/tsc/ninja/release |
475 | | - shell: sh |
476 | | - run: cmake --build . --config ${{ env.BUILD_TYPE }} -j 4 |
477 | | - |
478 | | - - name: Test |
479 | | - continue-on-error: false |
480 | | - working-directory: ${{github.workspace}}/__build/tsc/ninja/release |
481 | | - shell: sh |
482 | | - # Execute tests defined by the CMake configuration. |
483 | | - # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail |
484 | | - run: ctest -j1 -C ${{ env.BUILD_TYPE }} -T test --output-on-failure -T test --output-on-failure |
485 | | - env: |
486 | | - LLVM_SYMBOLIZER_PATH: ${{github.workspace}}/3rdParty/llvm/release/bin |
487 | | - |
488 | | - # Replicates installDefaultLib() from tsc/defaultlib.cpp: clone the default |
489 | | - # library sources and build them against the tsc/gc/llvm/runtime we just built. |
490 | | - - name: Clone Default Library |
491 | | - continue-on-error: false |
492 | | - working-directory: ${{github.workspace}} |
493 | | - shell: sh |
494 | | - run: if [ ! -d "./TypeScriptCompilerDefaultLib" ]; then git clone https://github.com/ASDAlexander77/TypeScriptCompilerDefaultLib.git; fi |
495 | | - |
496 | | - - name: Build Default Library |
497 | | - continue-on-error: false |
498 | | - working-directory: ${{github.workspace}}/TypeScriptCompilerDefaultLib |
499 | | - shell: sh |
500 | | - env: |
501 | | - TOOL_PATH: ${{github.workspace}}/__build/tsc/ninja/release/bin |
502 | | - GC_LIB_PATH: ${{github.workspace}}/__build/gc/ninja/release |
503 | | - LLVM_LIB_PATH: ${{github.workspace}}/3rdParty/llvm/release/lib |
504 | | - TSC_LIB_PATH: ${{github.workspace}}/__build/tsc/ninja/release/lib |
505 | | - run: chmod +x ./build.sh ./scripts/*.sh; ./build.sh release |
506 | | - |
507 | | - - name: Create Tar.GZ of Linux Asset |
508 | | - working-directory: ${{github.workspace}}/__build |
509 | | - shell: sh |
510 | | - run: tar -czvhf ../tsc-ub20.tar.gz ./tsc/ninja/release/bin/tsc ./tsc/ninja/release/lib/libTypeScriptRuntime.so ./gc/ninja/release/libgc.a ./tsc/ninja/release/lib/libTypeScriptAsyncRuntime.a ../3rdParty/llvm/release/bin/wasm-ld ../3rdParty/llvm/release/lib/libLLVMSupport.a ../3rdParty/llvm/release/lib/libLLVMDemangle.a -C ../TypeScriptCompilerDefaultLib/__build/release . |
511 | | - |
512 | | - - name: Archive Tar.GZ of Linux Asset |
513 | | - uses: actions/upload-artifact@v4 |
514 | | - with: |
515 | | - name: tsc-linux-asset-ub20 |
516 | | - path: tsc-ub20.tar.gz |
517 | | - retention-days: 1 |
518 | | - |
519 | 348 | create_release: |
520 | | - needs: [build_on_windows, build_on_linux, build_on_linux_ub20] |
| 349 | + needs: [build_on_windows, build_on_linux] |
521 | 350 | name: Create Release |
522 | 351 | runs-on: ubuntu-latest |
523 | 352 | steps: |
|
0 commit comments