1
0
mirror of https://github.com/renbaoshuo/s2oj-gcc.git synced 2024-12-27 04:01:54 +00:00

chore: upload dist to artifacts

This commit is contained in:
Baoshuo Ren 2023-11-17 06:38:02 +08:00
parent 53cd2cff86
commit f13b8e8730
Signed by: baoshuo
GPG Key ID: 00CB9680AB29F51A
2 changed files with 17 additions and 4 deletions

View File

@ -15,6 +15,13 @@ jobs:
apt install -y curl flex bzip2 git make gcc g++ libgmp-dev libmpfr-dev libmpc-dev gcc-multilib
- name: Build
run: bash build.sh
- name: Upload to artifact
uses: actions/upload-artifact@v3
with:
name: s2oj-gcc.zip
path: deb/
- name: Pack
run: dpkg-deb --build deb s2oj-gcc-$(cat GCC_VERSION)~1baoshuo1.deb
- name: Upload
run: |
curl --user "${GITEA_USER}:${GITEA_TOKEN}" \
@ -24,3 +31,11 @@ jobs:
GITEA_ENDPOINT: https://git.m.ac
GITEA_USER: baoshuo
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
- name: Get Package Filename
id: GetPackageFilename
run: echo ::set-output name=filename::s2oj-gcc-$(cat GCC_VERSION)~1baoshuo1.deb
- name: Upload to artifact
uses: actions/upload-artifact@v3
with:
name: s2oj-gcc.deb
path: ${{ steps.GetPackageFilename.outputs.filename }}

View File

@ -34,7 +34,6 @@ build_cd ${CURRENT_DIR}
# Configure GCC
echo "===> Configuring GCC..."
build_cd ${CURRENT_DIR}/build
echo " Now at: $(pwd)"
${GCC_SRC}/configure -v \
--enable-languages=c,c++ \
--prefix=/usr \
@ -47,8 +46,8 @@ ${GCC_SRC}/configure -v \
echo "===> Building GCC..."
make -j$(nproc)
# Make .deb package
echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..."
# Prepare for packaging
echo "===> Preparing for packaging..."
make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install
build_cd ${CURRENT_DIR}/deb
mkdir -p DEBIAN
@ -62,4 +61,3 @@ Maintainer: Baoshuo <i@baoshuo.ren>
Description: GCC $GCC_VERSION for S2OJ
EOF
build_cd ${CURRENT_DIR}
dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb