1
0
mirror of https://github.com/renbaoshuo/s2oj-gcc.git synced 2024-11-08 12:18:42 +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 apt install -y curl flex bzip2 git make gcc g++ libgmp-dev libmpfr-dev libmpc-dev gcc-multilib
- name: Build - name: Build
run: bash build.sh 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 - name: Upload
run: | run: |
curl --user "${GITEA_USER}:${GITEA_TOKEN}" \ curl --user "${GITEA_USER}:${GITEA_TOKEN}" \
@ -24,3 +31,11 @@ jobs:
GITEA_ENDPOINT: https://git.m.ac GITEA_ENDPOINT: https://git.m.ac
GITEA_USER: baoshuo GITEA_USER: baoshuo
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }} 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 # Configure GCC
echo "===> Configuring GCC..." echo "===> Configuring GCC..."
build_cd ${CURRENT_DIR}/build build_cd ${CURRENT_DIR}/build
echo " Now at: $(pwd)"
${GCC_SRC}/configure -v \ ${GCC_SRC}/configure -v \
--enable-languages=c,c++ \ --enable-languages=c,c++ \
--prefix=/usr \ --prefix=/usr \
@ -47,8 +46,8 @@ ${GCC_SRC}/configure -v \
echo "===> Building GCC..." echo "===> Building GCC..."
make -j$(nproc) make -j$(nproc)
# Make .deb package # Prepare for packaging
echo "===> Making .deb package \"s2oj-gcc-$GCC_VERSION~1baoshuo1.deb\" ..." echo "===> Preparing for packaging..."
make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install make -j$(nproc) DESTDIR=${CURRENT_DIR}/deb install
build_cd ${CURRENT_DIR}/deb build_cd ${CURRENT_DIR}/deb
mkdir -p DEBIAN mkdir -p DEBIAN
@ -62,4 +61,3 @@ Maintainer: Baoshuo <i@baoshuo.ren>
Description: GCC $GCC_VERSION for S2OJ Description: GCC $GCC_VERSION for S2OJ
EOF EOF
build_cd ${CURRENT_DIR} build_cd ${CURRENT_DIR}
dpkg-deb --build deb s2oj-gcc-$GCC_VERSION~1baoshuo1.deb