export cc variables #7
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 Multi-Architecture | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: ubuntu-24.04 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - arch: x86_64 | |
| artifact_name: fusequota-x86_64-linux | |
| - arch: aarch64 | |
| artifact_name: fusequota-aarch64-linux | |
| - arch: riscv64 | |
| artifact_name: fusequota-riscv64-linux | |
| - arch: ppc64le | |
| artifact_name: fusequota-ppc64le-linux | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build (Native x86_64) | |
| if: matrix.arch == 'x86_64' | |
| run: | | |
| sudo apt-get update -q -y | |
| sudo apt-get install -q -y \ | |
| build-essential \ | |
| gcc-14 g++-14 \ | |
| cmake ninja-build meson pkg-config fuse3 git | |
| export CC=gcc-14 | |
| export CXX=g++-14 | |
| echo "Building fusequota for ${{ matrix.arch }}" | |
| make all | |
| - name: Build on ${{ matrix.arch }} (Emulated) | |
| if: matrix.arch != 'x86_64' | |
| uses: uraimo/run-on-arch-action@v3 | |
| with: | |
| arch: ${{ matrix.arch }} | |
| distro: ubuntu24.04 | |
| githubToken: ${{ github.token }} | |
| install: | | |
| apt-get update -q -y | |
| apt-get install -q -y \ | |
| build-essential \ | |
| gcc-14 g++-14 \ | |
| cmake ninja-build meson pkg-config fuse3 git | |
| run: | | |
| export CC=gcc-14 | |
| export CXX=g++-14 | |
| echo "Building fusequota for ${{ matrix.arch }}" | |
| make all | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: ./build/fusequota | |
| if-no-files-found: error | |
| create-release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: binaries | |
| - name: Rename binaries | |
| run: | | |
| mkdir -p release | |
| find binaries/ -type f -name "fusequota" | while read -r file; do | |
| ARCH_NAME=$(basename $(dirname "$file")) | |
| cp "$file" "release/$ARCH_NAME" | |
| done | |
| chmod +x release/* | |
| - name: Create Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: release/* | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |