Skip to content

Commit

Permalink
first release
Browse files Browse the repository at this point in the history
  • Loading branch information
xdoardo committed Oct 15, 2024
0 parents commit 03a639e
Show file tree
Hide file tree
Showing 5 changed files with 537 additions and 0 deletions.
158 changes: 158 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
name: Build

on: [push]

jobs:
build:
name: Build

strategy:
matrix:
target:
- id: 'linux-amd64'
os: 'ubuntu-20.04'
- id: 'darwin-amd64'
os: 'macos-13'
- id: 'darwin-aarch64'
os: 'macos-latest'
- id: 'windows-amd64'
os: 'windows-2022'
# When unpacking an archive on Windows, the symlinks can't be
# created unless the target path already exists. This causes
# problems when the linked file is ordered after the link
# inside the archive. Dereferencing the files when packing them
# adds an additional copy per link, but it reliably works and
# the additional size is not too large on Windows.
tar_extra_args: '--dereference'
tag: ['11.6']
fail-fast: true

runs-on: ${{ matrix.target.os }}

steps:
- name: Check out the code
uses: actions/checkout@v3

- name: Install `ninja` on Ubuntu
if: startsWith(matrix.target.id, 'linux-')
shell: bash
run: |
sudo apt-get install ninja-build -y
- name: Install `ninja` on macOS
if: startsWith(matrix.target.id, 'darwin-')
shell: bash
run: |
brew install ninja
- name: Install `ninja` on Windows
if: startsWith(matrix.target.id, 'windows-')
shell: bash
run: |
choco install ninja
- name: Setup MSVC (Windows)
uses: ilammy/msvc-dev-cmd@v1
if: matrix.target.id == 'windows-amd64'

- name: Build
if: matrix.target.id != 'windows-amd64'
shell: bash
run: |
./build.sh
- name: Build (Windows)
if: matrix.target.id == 'windows-amd64'
run: |
./build.ps1
- name: Zip
shell: bash
run: |
mkdir -p dist
tar --directory v8-cmake/build/destdir --create --xz --verbose ${{ matrix.target.tar_extra_args }} --file dist/wee8.tar.xz .
ls -lh dist/wee8.tar.xz
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.target.id }}-${{ matrix.tag }}
path: dist
if-no-files-found: error
retention-days: 1

release:
name: Release

runs-on: ubuntu-latest

needs: [build]


strategy:
matrix:
tag: ['11.6']


steps:
- name: Download the Artifacts
uses: actions/download-artifact@v3
with:
path: artifacts

- name: Inspect
shell: bash
run: |
ls -laGiR ./*
- name: Create Release
id: create_release
uses: ncipollo/release-action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag: ${{ matrix.tag }}
name: Release ${{ matrix.tag }}
allowUpdates: true
draft: false
prerelease: false

- name: Upload Release Asset Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/linux-amd64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-linux-amd64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Darwin
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/darwin-amd64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-darwin-amd64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Darwin (aarch64)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/darwin-aarch64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-darwin-aarch64.tar.xz
asset_content_type: application/gzip

- name: Upload Release Asset Windows
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: artifacts/windows-amd64-${{matrix.tag}}/wee8.tar.xz
asset_name: wee8-windows-amd64.tar.xz
asset_content_type: application/gzip
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019-present Wasmer, Inc. and its affiliates.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
Loading

0 comments on commit 03a639e

Please sign in to comment.