v3.0.0 #9
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 🛠️ Build cppp-reiconv | |
| on: | |
| release: | |
| types: [published] | |
| jobs: | |
| build-dist: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📁 Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🧰 Setup Rubisco | |
| id: rubisco | |
| uses: cppp-project/rubisco@main | |
| with: | |
| host: x86_64-linux-gnu | |
| - name: 📁 Collect subpackages | |
| run: | | |
| git clone https://github.com/cppp-project/build-aux --depth 1 | |
| git clone https://github.com/cppp-project/cppp-platform --depth 1 | |
| - name: 📦 Build source distribution | |
| run: | | |
| rubisco dist | |
| # Rubisco will support it later. | |
| - name: 📦 Generate checksum | |
| run: | | |
| cd dist | |
| for i in $(ls) ; do sha256sum $i > $i.sha256 ; done | |
| cd .. | |
| - name: ⬆️ Create release and upload assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.rubisco.outputs.tag }} | |
| files: ./dist/* | |
| build-linux: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| host: [ | |
| aarch64-linux-gnu, | |
| alpha-linux-gnu, | |
| arm-linux-gnueabi, | |
| arm-linux-gnueabihf, | |
| i686-linux-gnu, | |
| mips-linux-gnu, | |
| mips64-linux-gnuabi64, | |
| mips64el-linux-gnuabi64, | |
| mipsel-linux-gnu, | |
| powerpc-linux-gnu, | |
| powerpc64-linux-gnu, | |
| riscv64-linux-gnu, | |
| sh4-linux-gnu, | |
| x86_64-linux-gnu | |
| ] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: 📁 Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🧰 Setup Rubisco | |
| id: rubisco | |
| uses: cppp-project/rubisco@main | |
| with: | |
| host: ${{ matrix.host }} | |
| # Rubisco don't support setup cross-compiler now. | |
| - name: 📁 Collect dependencies | |
| run: | | |
| sudo apt-get update | |
| if [ "${{ matrix.host }}" = "x86_64-linux-gnu" ] ; | |
| then | |
| sudo apt-get install gcc g++ -y ; | |
| else | |
| sudo apt-get install gcc-${{ matrix.host }} g++-${{ matrix.host }} -y ; | |
| fi | |
| - name: 📁 Collect subpackages | |
| run: | | |
| git clone https://github.com/cppp-project/build-aux --depth 1 | |
| git clone https://github.com/cppp-project/cppp-platform --depth 1 | |
| - name: 🧳 Prepare for building | |
| run: | | |
| mkdir -p ${{ steps.rubisco.outputs.pkgname }}-${{ matrix.host }} | |
| mkdir -p dist | |
| - name: 🛠️ Build binary distribution | |
| run: | | |
| export C_COMPILER="gcc" | |
| export CXX_COMPILER="g++" | |
| export LINKER="ld" | |
| export CC_CROSS="/usr/bin/${{ matrix.host }}-$C_COMPILER" | |
| export CXX_CROSS="/usr/bin/${{ matrix.host }}-$CXX_COMPILER" | |
| export LD="/usr/bin/${{ matrix.host }}-$LINKER" | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_TESTING=OFF -DICONV_COMPAT=OFF -DCMAKE_INSTALL_PREFIX="${{ steps.rubisco.outputs.srcdir }}/${{ steps.rubisco.outputs.pkgname }}-${{ matrix.host }}" -DCMAKE_C_COMPILER=$CC_CROSS -DCMAKE_CXX_COMPILER=$CXX_CROSS -DCMAKE_LINKER=$LD | |
| cmake --build . --config=Release -j $(nproc) | |
| cmake --install . --config=Release | |
| cd .. | |
| - name: 📦 Make packages | |
| run: | | |
| tar cvf dist/${{ steps.rubisco.outputs.pkgname }}-${{ matrix.host }}.tar ${{ steps.rubisco.outputs.pkgname }}-${{ matrix.host }} | |
| xz -9 dist/${{ steps.rubisco.outputs.pkgname }}-${{ matrix.host }}.tar | |
| - name: 📦 Generate checksum | |
| run: | | |
| cd dist | |
| for i in $(ls) ; do sha256sum $i > $i.sha256 ; done | |
| cd .. | |
| - name: ⬆️ Create release and upload assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.rubisco.outputs.tag }} | |
| files: ./dist/* | |
| build-darwin: | |
| runs-on: macos-latest | |
| steps: | |
| - name: 📁 Checkout | |
| uses: actions/checkout@v4 | |
| - name: 🧰 Setup Rubisco | |
| id: rubisco | |
| uses: cppp-project/rubisco@main | |
| with: | |
| host: arm64-apple-darwin | |
| - name: 📁 Collect dependencies | |
| run: | | |
| brew install coreutils | |
| - name: 📁 Collect subpackages | |
| run: | | |
| git clone https://github.com/cppp-project/build-aux --depth 1 | |
| git clone https://github.com/cppp-project/cppp-platform --depth 1 | |
| - name: 🧳 Prepare for building | |
| run: | | |
| mkdir -p ${{ steps.rubisco.outputs.pkgname }}-arm64-apple-darwin | |
| mkdir -p dist | |
| - name: 🛠️ Build binary distribution | |
| run: | | |
| mkdir build | |
| cd build | |
| cmake .. -DBUILD_TESTING=OFF -DICONV_COMPAT=OFF -DCMAKE_INSTALL_PREFIX="${{ steps.rubisco.outputs.srcdir }}/${{ steps.rubisco.outputs.pkgname }}-arm64-apple-darwin" | |
| cmake --build . --config=Release -j $(nproc) | |
| cmake --install . --config=Release | |
| cd .. | |
| - name: 📦 Make packages | |
| run: | | |
| tar cvf dist/${{ steps.rubisco.outputs.pkgname }}-arm64-apple-darwin.tar ${{ steps.rubisco.outputs.pkgname }}-arm64-apple-darwin | |
| xz -9 dist/${{ steps.rubisco.outputs.pkgname }}-arm64-apple-darwin.tar | |
| - name: 📦 Generate checksum | |
| run: | | |
| cd dist | |
| for i in $(ls) ; do sha256sum $i > $i.sha256 ; done | |
| cd .. | |
| - name: ⬆️ Create release and upload assets | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| tag_name: ${{ steps.rubisco.outputs.tag }} | |
| files: ./dist/* | |
| # Rubisco cannot been install due to encoding problems on Windows. | |
| # build-windows: | |
| # runs-on: windows-latest | |
| # steps: | |
| # - name: 📁 Checkout | |
| # uses: actions/checkout@v4 | |
| # - name: 🧰 Setup Rubisco | |
| # id: rubisco | |
| # uses: cppp-project/rubisco@main | |
| # with: | |
| # host: x86_64-windows-msvc | |
| # - name: 📁 Collect dependencies | |
| # run: | | |
| # choco install zip dos2unix mingw -y | |
| # - name: 📁 Collect subpackages | |
| # run: | | |
| # git clone https://github.com/cppp-project/build-aux --depth 1 | |
| # git clone https://github.com/cppp-project/cppp-platform --depth 1 | |
| # - name: 🧳 Prepare for building | |
| # run: | | |
| # mkdir -p ${{ steps.rubisco.outputs.pkgname }}-x86_64-windows-msvc | |
| # mkdir -p dist | |
| # - name: 🛠️ Build binary distribution | |
| # run: | | |
| # mkdir build | |
| # cd build | |
| # cmake .. -DBUILD_TESTING=OFF -DICONV_COMPAT=ON -DCMAKE_INSTALL_PREFIX="${{ steps.rubisco.outputs.srcdir }}/${{ steps.rubisco.outputs.pkgname }}-x86_64-windows-msvc" | |
| # cmake --build . --config=Release -j $(nproc) | |
| # cmake --install . --config=Release | |
| # cd .. | |
| # - name: 📦 Make packages | |
| # run: | | |
| # tar cvf dist/${{ steps.rubisco.outputs.pkgname }}-x86_64-windows-msvc.tar ${{ steps.rubisco.outputs.pkgname }}-x86_64-windows-msvc | |
| # xz -9 dist/${{ steps.rubisco.outputs.pkgname }}-x86_64-windows-msvc.tar | |
| # - name: 📦 Generate checksum | |
| # run: | | |
| # cd dist | |
| # Get-ChildItem | ForEach-Object { | |
| # sha256sum $_.Name > ($_.Name + ".sha256") | |
| # dos2unix ($_.Name + ".sha256") | |
| # } | |
| # cd .. | |
| # - name: ⬆️ Create release and upload assets | |
| # uses: softprops/action-gh-release@v1 | |
| # with: | |
| # tag_name: ${{ steps.rubisco.outputs.tag }} | |
| # files: ./dist/* |