build javascriptcore #32
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
name: build javascriptcore | |
on: | |
workflow_dispatch: | |
inputs: | |
tag_date: | |
description: 'tag date' | |
required: true | |
build_windows: | |
description: 'Build for Windows platform' | |
type: boolean | |
default: true | |
required: false | |
build_macos: | |
description: 'Build for MacOS platform' | |
type: boolean | |
default: true | |
required: false | |
build_linux: | |
description: 'Build for Linux platform' | |
type: boolean | |
default: true | |
required: false | |
do_publish: | |
description: 'Publish a release' | |
type: boolean | |
default: true | |
required: false | |
jobs: | |
build_linux: | |
if: github.event.inputs.build_linux == 'true' | |
name: Linux | |
runs-on: ubuntu-latest | |
steps: | |
- name: Install LibC++ | |
run: | | |
sudo apt-get update | |
sudo apt-get install clang | |
sudo apt-get install build-essential | |
sudo apt-get install libc++-dev | |
sudo apt-get install libc++abi-dev | |
- uses: actions/checkout@v2 | |
- name: Run build script | |
run: | | |
bash ./linux64.sh | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: jsc_bin | |
path: jsc_bin/**/* | |
build_windows: | |
if: github.event.inputs.build_windows == 'true' | |
name: Windows | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Install Deps | |
shell: pwsh | |
run: | | |
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1')) | |
choco install -y xampp-81 python311 ruby git cmake gperf llvm ninja | |
python -m pip install pywin32 | |
gem install webrick | |
- uses: ilammy/msvc-dev-cmd@v1 | |
- name: Run build script | |
shell: cmd | |
run: | | |
.\win64.bat | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: jsc_bin | |
path: jsc_bin/**/* | |
build_macos: | |
if: github.event.inputs.build_macos == 'true' | |
name: macOS | |
runs-on: macos-13 #macos-latest/macos-14 is arm64 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Run build script | |
run: | | |
sudo xcode-select -switch "/Applications/Xcode_15.2.app" | |
bash ./osx64.sh | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: jsc_bin | |
path: jsc_bin/**/* | |
publish: | |
if: github.event.inputs.do_publish == 'true' | |
runs-on: ubuntu-20.04 | |
needs: [build_linux,build_windows,build_macos] | |
steps: | |
- uses: actions/download-artifact@v1 | |
with: | |
name: jsc_bin | |
path: jsc_bin/ | |
- name: Create Release Asset | |
run: | | |
cd jsc_bin/ && tar cvfz ../jsc_bin_${{github.event.inputs.tag_date}}.tgz jsc && cd - | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: jsc_bin_${{ github.event.inputs.tag_date }} | |
release_name: jsc_bin_${{ github.event.inputs.tag_date }} | |
draft: false | |
prerelease: false | |
- name: Upload jscore bin | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.create_release.outputs.upload_url }} | |
asset_path: ./jsc_bin_${{github.event.inputs.tag_date}}.tgz | |
asset_name: jsc_bin_${{github.event.inputs.tag_date}}.tgz | |
asset_content_type: application/tgz | |