This commit is contained in:
Evgeny Snitko
2024-10-25 06:46:25 +04:00
committed by GitHub
parent cc38c37481
commit d5b9c489ea
4 changed files with 83 additions and 0 deletions
+6
View File
@@ -0,0 +1,6 @@
FROM revive-llvm
WORKDIR /app
COPY . .
RUN RUSTFLAGS='-L /app/llvm18.0/lib/unknown -L /usr/lib -L /app/llvm18.0/lib' REVIVE_INSTALL_DIR='/app/release/revive/' make install-revive
+14
View File
@@ -0,0 +1,14 @@
FROM alpine:3.20.3
ARG RUST_VERSION=stable
RUN apk add bash git cmake make g++ ninja python3 ncurses-static curl lld-dev lld lld-libs libc++-static
RUN ninja --version
RUN bash -c ./build-llvm.sh
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain ${RUST_VERSION}
ENV PATH=/root/.cargo/bin:/llvm18.0/bin:${PATH}
WORKDIR /app
RUN REVIVE_INSTALL_DIR=$(pwd)/target/release
+40
View File
@@ -0,0 +1,40 @@
name: Release
run-name: Release ${{ github.ref_name }}
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-[a-zA-Z0-9]+"
jobs:
CreateRelease:
permissions:
contents: write
runs-on: ubuntu-20.04
steps:
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
make_latest: true
Release:
needs: [CreateRelease]
permissions:
contents: write
runs-on: ubuntu-20.04
env:
GH_TOKEN: ${{ github.token }}
steps:
- name: build llvm
run: docker build -t revive-llvm:latest --progress=plain -f --build-arg RUST_VERSION=1.80 .github/Dockerfile-llvm
- name: build revive
run: docker build -t revive:latest --progress=plain -f .github/Dockerfile
- name: get binary
run: docker run --rm revive:latest -v output:/app/output cp /app/release/revive/resolc /app/output
# docker push revive:latest
- run: gh release upload ${{ github.ref_name }} output/resolc --clobber
+23
View File
@@ -0,0 +1,23 @@
name: Release
run-name: Release ${{ github.ref_name }}
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
Release:
runs-on: ubuntu-20.04
steps:
- name: build llvm
run: docker build -t revive-llvm:latest --progress=plain -f --build-arg RUST_VERSION=1.80 .github/Dockerfile-llvm
- name: build revive
run: docker build -t revive:latest --progress=plain -f .github/Dockerfile
- name: get binary
run: docker run --rm revive:latest -v output:/app/output cp /app/release/revive/resolc /app/output
# docker push revive:latest
- run: gh release upload ${{ github.ref_name }} output/resolc --clobber