build: use GCC to compile & use alpine image for Docker (#88)

This commit is contained in:
2024-06-04 18:48:54 +02:00
committed by GitHub
parent 27c2b2b75b
commit 3f1d78ec10
7 changed files with 19 additions and 168 deletions

View File

@ -29,9 +29,12 @@ jobs:
- debug
- release
arch:
- x86
- x64
- arm64
include:
- arch: x86
platform: Win32
- arch: x64
platform: x64
- arch: arm64
@ -80,6 +83,7 @@ jobs:
- debug
- release
arch:
- x86
- x64
steps:
- name: Check out files
@ -90,19 +94,23 @@ jobs:
# NOTE - If LFS ever starts getting used during builds, switch this to true!
lfs: false
- name: Install dependencies (x64)
if: matrix.arch == 'x64'
- name: Install dependencies (x86)
if: matrix.arch == 'x86'
run: |
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libcurl4-gnutls-dev -y
sudo apt-get -y install gcc-multilib g++-multilib
- name: Install Premake5
uses: diamante0018/setup-premake@master
with:
version: ${{ env.PREMAKE_VERSION }}
- name: Install Mold
uses: rui314/setup-mold@staging
- name: Generate project files
run: premake5 --cc=clang gmake2
run: premake5 gmake2
- name: Set up problem matching
uses: ammaraskar/gcc-problem-matcher@master
@ -111,9 +119,6 @@ jobs:
run: |
pushd build
make config=${{matrix.configuration}}_${{matrix.arch}} -j$(nproc)
env:
CC: clang
CXX: clang++
- name: Upload ${{matrix.arch}} ${{matrix.configuration}} binaries
uses: actions/upload-artifact@main
@ -124,7 +129,7 @@ jobs:
build-macos:
name: Build macOS
runs-on: macos-13
runs-on: macos-14
strategy:
fail-fast: false
matrix:
@ -224,10 +229,10 @@ jobs:
shell: bash
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3.2.0
uses: docker/setup-buildx-action@v3.3.0
- name: Login to DockerHub
uses: docker/login-action@v3.1.0
uses: docker/login-action@v3.2.0
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
@ -243,7 +248,7 @@ jobs:
- name: Build and Push Docker Image
id: build-and-push
uses: docker/build-push-action@v5.1.0
uses: docker/build-push-action@v5.3.0
with:
context: .
platforms: linux/amd64