forked from servo/mozjs
-
Notifications
You must be signed in to change notification settings - Fork 1
46 lines (42 loc) · 1.48 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Version Release Check
on:
release:
types: [published]
workflow_call:
inputs:
release-tag:
required: true
type: string
env:
RUST_BACKTRACE: 1
SHELL: /bin/bash
CARGO_INCREMENTAL: 0
jobs:
verify-archive:
strategy:
fail-fast: false
matrix:
platform:
- { target: aarch64-apple-darwin, os: macos-14 }
- { target: x86_64-apple-darwin, os: macos-13 }
- { target: x86_64-unknown-linux-gnu, os: ubuntu-latest }
- { target: x86_64-pc-windows-msvc, os: windows-latest }
runs-on: ${{ matrix.platform.os }}
env:
RELEASE_TAG: ${{ github.event_name == 'release' && github.ref_name || inputs.release-tag }}
MOZJS_ARCHIVE: libmozjs-${{ matrix.platform.target }}.tar.gz
steps:
- uses: actions/checkout@v4
- name: Download prebuilt mozjs from artifact
if: ${{ env.RELEASE_TAG == '' }}
uses: actions/download-artifact@v4
with:
name: libmozjs-${{ matrix.platform.target }}.tar.gz
- name: Download prebuilt mozjs from release
if: ${{ env.RELEASE_TAG != '' }}
run: |
curl -L https://github.com/${{ github.repository_owner }}/mozjs/releases/download/${{ env.RELEASE_TAG }}/libmozjs-${{ matrix.platform.target }}.tar.gz -o libmozjs-${{ matrix.platform.target }}.tar.gz
- name: Build
run: |
cargo build --verbose --features streams
cargo test --tests --examples --verbose --features streams