diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d71c53c..635c0d0 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,10 +1,9 @@ name: ci.yml on: - push: - branches: ['**'] pull_request: jobs: build: + name: Check Build runs-on: ubuntu-26.04 permissions: contents: read diff --git a/.github/workflows/distribution.yml b/.github/workflows/distribution.yml new file mode 100644 index 0000000..b9ccea1 --- /dev/null +++ b/.github/workflows/distribution.yml @@ -0,0 +1,88 @@ +name: distribution.yml +on: + push: + branches: ['**'] +jobs: + build: + name: Check Build + runs-on: ubuntu-26.04 + permissions: + contents: read + checks: write + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Install gf + run : | + sudo apt-get update -y + sudo apt-get install libsdl2-dev libstb-dev libboost-dev libfreetype6-dev zlib1g-dev libpugixml-dev cmake -y + git clone https://github.com/GamedevFramework/gf.git + cd gf + git submodule update --init + mkdir build + cd build + cmake ../ -DGF_BUILD_GAMES=ON -DGF_BUILD_TOOLS=ON -DCMAKE_CXX_FLAGS="-include cstdint" + make + sudo make install + + - name: CMake + run: mkdir build && cd build && cmake .. + + - name: Build + run: cd build && make + build-linux: + name: Build Linux + needs: + - build + runs-on: ubuntu-26.04 + permissions: + contents: read + checks: write + + steps: + - name: Checkout + uses: actions/checkout@v7 + + - name: Install gf + run : | + sudo apt-get update -y + sudo apt-get install libsdl2-dev libstb-dev libboost-dev libfreetype6-dev zlib1g-dev libpugixml-dev cmake -y + git clone https://github.com/GamedevFramework/gf.git + cd gf + git submodule update --init + mkdir build + cd build + cmake ../ -DBUILD_SHARED_LIBS=OFF -DGF_BUILD_GAMES=ON -DGF_BUILD_TOOLS=ON -DCMAKE_CXX_FLAGS="-include cstdint" + make + sudo make install + + - name: CMake + run: mkdir build && cd build && cmake .. + + - name: Build + run: cd build && make + + - name: Prepare Client + run: mkdir stank-client-linux && cp build/stank stank-client-linux/ + + - name: Upload Artifact Client + uses: actions/upload-artifact@v7 + with: + name: stank-client-linux-x86_84 + path: stank-client-linux/ + retention-days: 7 + + - name: Prepare Server + run: mkdir stank-server-linux && cp build/stank_server stank-server-linux/ + + - name: Upload Artifact Server + uses: actions/upload-artifact@v7 + with: + name: stank-server-linux-x86_84 + path: stank-server-linux/ + retention-days: 7 + +# A voir plus tard pour CI/CD windows, macos +