mirror of
				https://github.com/lightpanda-io/browser.git
				synced 2025-10-30 07:31:47 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			95 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
			
		
		
	
	
			95 lines
		
	
	
		
			2.6 KiB
		
	
	
	
		
			YAML
		
	
	
	
	
	
| name: "Browsercore install"
 | |
| description: "Install deps for the project browsercore"
 | |
| 
 | |
| inputs:
 | |
|   zig:
 | |
|     description: 'Zig version to install'
 | |
|     required: false
 | |
|     default: '0.15.2'
 | |
|   arch:
 | |
|     description: 'CPU arch used to select the v8 lib'
 | |
|     required: false
 | |
|     default: 'x86_64'
 | |
|   os:
 | |
|     description: 'OS used to select the v8 lib'
 | |
|     required: false
 | |
|     default: 'linux'
 | |
|   zig-v8:
 | |
|     description: 'zig v8 version to install'
 | |
|     required: false
 | |
|     default: 'v0.1.33'
 | |
|   v8:
 | |
|     description: 'v8 version to install'
 | |
|     required: false
 | |
|     default: '14.0.365.4'
 | |
|   cache-dir:
 | |
|     description: 'cache dir to use'
 | |
|     required: false
 | |
|     default: '~/.cache'
 | |
| 
 | |
| runs:
 | |
|   using: "composite"
 | |
| 
 | |
|   steps:
 | |
|     - name: Install apt deps
 | |
|       if: ${{ inputs.os == 'linux' }}
 | |
|       shell: bash
 | |
|       run: |
 | |
|         sudo apt-get update
 | |
|         sudo apt-get install -y wget xz-utils python3 ca-certificates git pkg-config libglib2.0-dev gperf libexpat1-dev cmake clang
 | |
| 
 | |
|     - uses: mlugg/setup-zig@v2
 | |
|       with:
 | |
|         version: ${{ inputs.zig }}
 | |
| 
 | |
|     - name: Cache v8
 | |
|       id: cache-v8
 | |
|       uses: actions/cache@v4
 | |
|       env:
 | |
|         cache-name: cache-v8
 | |
|       with:
 | |
|         path: ${{ inputs.cache-dir }}/v8
 | |
|         key: libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}_${{ inputs.zig-v8 }}.a
 | |
| 
 | |
|     - if: ${{ steps.cache-v8.outputs.cache-hit != 'true' }}
 | |
|       shell: bash
 | |
|       run: |
 | |
|         mkdir -p ${{ inputs.cache-dir }}/v8
 | |
| 
 | |
|         wget -O ${{ inputs.cache-dir }}/v8/libc_v8.a https://github.com/lightpanda-io/zig-v8-fork/releases/download/${{ inputs.zig-v8 }}/libc_v8_${{ inputs.v8 }}_${{ inputs.os }}_${{ inputs.arch }}.a
 | |
| 
 | |
|     - name: install v8
 | |
|       shell: bash
 | |
|       run: |
 | |
|         mkdir -p v8/out/${{ inputs.os }}/debug/obj/zig/
 | |
|         ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/debug/obj/zig/libc_v8.a
 | |
| 
 | |
|         mkdir -p v8/out/${{ inputs.os }}/release/obj/zig/
 | |
|         ln -s ${{ inputs.cache-dir }}/v8/libc_v8.a v8/out/${{ inputs.os }}/release/obj/zig/libc_v8.a
 | |
| 
 | |
|     - name: Cache libiconv
 | |
|       id: cache-libiconv
 | |
|       uses: actions/cache@v4
 | |
|       env:
 | |
|         cache-name: cache-libiconv
 | |
|       with:
 | |
|         path: ${{ inputs.cache-dir }}/libiconv
 | |
|         key: vendor/libiconv/libiconv-1.17
 | |
| 
 | |
|     - name: download libiconv
 | |
|       if: ${{ steps.cache-libiconv.outputs.cache-hit != 'true' }}
 | |
|       shell: bash
 | |
|       run: make download-libiconv
 | |
| 
 | |
|     - name: build libiconv
 | |
|       shell: bash
 | |
|       run: make build-libiconv
 | |
| 
 | |
|     - name: build mimalloc
 | |
|       shell: bash
 | |
|       run: make install-mimalloc
 | |
| 
 | |
|     - name: build netsurf
 | |
|       shell: bash
 | |
|       run: make install-netsurf
 | 
