mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-04-25 08:17:58 +00:00
lint
This commit is contained in:
@@ -1,19 +1,18 @@
|
||||
name: "Get Emscripten SDK"
|
||||
inputs:
|
||||
version:
|
||||
description: ""
|
||||
required: false
|
||||
default: "3.1.64"
|
||||
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: install emsdk
|
||||
shell: bash
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git ./emsdk/
|
||||
cd emsdk
|
||||
git checkout tags/${{ inputs.version }}
|
||||
./emsdk install ${{ inputs.version }}
|
||||
./emsdk activate ${{ inputs.version }}
|
||||
name: "Get Emscripten SDK"
|
||||
inputs:
|
||||
version:
|
||||
description: ""
|
||||
required: false
|
||||
default: "3.1.64"
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: install emsdk
|
||||
shell: bash
|
||||
run: |
|
||||
git clone https://github.com/emscripten-core/emsdk.git ./emsdk/
|
||||
cd emsdk
|
||||
git checkout tags/${{ inputs.version }}
|
||||
./emsdk install ${{ inputs.version }}
|
||||
./emsdk activate ${{ inputs.version }}
|
||||
|
||||
@@ -1,70 +1,70 @@
|
||||
# example:
|
||||
# - uses: ./.github/actions/get-llvm
|
||||
# with:
|
||||
# target: x86_64-unknown-linux-gnu
|
||||
|
||||
name: "Download LLVM"
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: find asset
|
||||
id: find
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
target: ${{ inputs.target }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
let page = 1;
|
||||
let releases = [];
|
||||
|
||||
let releasePrefix = "llvm-"
|
||||
let target = process.env.target
|
||||
|
||||
do {
|
||||
const res = await github.rest.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
per_page: 50,
|
||||
page,
|
||||
});
|
||||
|
||||
releases = res.data
|
||||
releases.sort((a, b) => {
|
||||
return (a.published_at < b.published_at) ? 1 : ((a.published_at > b.published_at) ? -1 : 0);
|
||||
});
|
||||
|
||||
let llvmLatestRelease = releases.find(release => {
|
||||
return release.tag_name.startsWith(releasePrefix);
|
||||
});
|
||||
if (llvmLatestRelease){
|
||||
let asset = llvmLatestRelease.assets.find(asset =>{
|
||||
return asset.name.includes(target);
|
||||
});
|
||||
if (!asset){
|
||||
core.setFailed(`Artifact for '${target}' not found in release ${llvmLatestRelease.tag_name} (${llvmLatestRelease.html_url})`);
|
||||
process.exit();
|
||||
}
|
||||
return asset.browser_download_url;
|
||||
}
|
||||
|
||||
page++;
|
||||
} while(releases.length > 0);
|
||||
|
||||
core.setFailed(`No LLVM releases with '${releasePrefix}' atifacts found! Please release LLVM before running this workflow.`);
|
||||
process.exit();
|
||||
|
||||
- name: download
|
||||
shell: bash
|
||||
run: |
|
||||
curl -sSLo llvm.tar.gz ${{ steps.find.outputs.result }}
|
||||
|
||||
- name: unpack
|
||||
shell: bash
|
||||
run: |
|
||||
tar -xf llvm.tar.gz
|
||||
rm llvm.tar.gz
|
||||
# example:
|
||||
# - uses: ./.github/actions/get-llvm
|
||||
# with:
|
||||
# target: x86_64-unknown-linux-gnu
|
||||
|
||||
name: "Download LLVM"
|
||||
inputs:
|
||||
target:
|
||||
required: true
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: find asset
|
||||
id: find
|
||||
uses: actions/github-script@v7
|
||||
env:
|
||||
target: ${{ inputs.target }}
|
||||
with:
|
||||
result-encoding: string
|
||||
script: |
|
||||
let page = 1;
|
||||
let releases = [];
|
||||
|
||||
let releasePrefix = "llvm-"
|
||||
let target = process.env.target
|
||||
|
||||
do {
|
||||
const res = await github.rest.repos.listReleases({
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
per_page: 50,
|
||||
page,
|
||||
});
|
||||
|
||||
releases = res.data
|
||||
releases.sort((a, b) => {
|
||||
return (a.published_at < b.published_at) ? 1 : ((a.published_at > b.published_at) ? -1 : 0);
|
||||
});
|
||||
|
||||
let llvmLatestRelease = releases.find(release => {
|
||||
return release.tag_name.startsWith(releasePrefix);
|
||||
});
|
||||
if (llvmLatestRelease){
|
||||
let asset = llvmLatestRelease.assets.find(asset =>{
|
||||
return asset.name.includes(target);
|
||||
});
|
||||
if (!asset){
|
||||
core.setFailed(`Artifact for '${target}' not found in release ${llvmLatestRelease.tag_name} (${llvmLatestRelease.html_url})`);
|
||||
process.exit();
|
||||
}
|
||||
return asset.browser_download_url;
|
||||
}
|
||||
|
||||
page++;
|
||||
} while(releases.length > 0);
|
||||
|
||||
core.setFailed(`No LLVM releases with '${releasePrefix}' atifacts found! Please release LLVM before running this workflow.`);
|
||||
process.exit();
|
||||
|
||||
- name: download
|
||||
shell: bash
|
||||
run: |
|
||||
curl -sSLo llvm.tar.gz ${{ steps.find.outputs.result }}
|
||||
|
||||
- name: unpack
|
||||
shell: bash
|
||||
run: |
|
||||
tar -xf llvm.tar.gz
|
||||
rm llvm.tar.gz
|
||||
|
||||
@@ -37,7 +37,15 @@ jobs:
|
||||
build:
|
||||
strategy:
|
||||
matrix:
|
||||
target: [x86_64-unknown-linux-gnu, x86_64-unknown-linux-musl, wasm32-unknown-emscripten, aarch64-apple-darwin, x86_64-apple-darwin, x86_64-pc-windows-msvc]
|
||||
target:
|
||||
[
|
||||
x86_64-unknown-linux-gnu,
|
||||
x86_64-unknown-linux-musl,
|
||||
wasm32-unknown-emscripten,
|
||||
aarch64-apple-darwin,
|
||||
x86_64-apple-darwin,
|
||||
x86_64-pc-windows-msvc,
|
||||
]
|
||||
include:
|
||||
- target: x86_64-unknown-linux-gnu
|
||||
builder-arg: gnu
|
||||
|
||||
@@ -4,9 +4,9 @@ on:
|
||||
branches: ["main"]
|
||||
types: [opened, synchronize]
|
||||
paths:
|
||||
- 'LLVM.lock'
|
||||
- 'crates/llvm-builder/**'
|
||||
- '.github/workflows/test-llvm-builder.yml'
|
||||
- "LLVM.lock"
|
||||
- "crates/llvm-builder/**"
|
||||
- ".github/workflows/test-llvm-builder.yml"
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
||||
|
||||
Reference in New Issue
Block a user