BLUGA-GRAPHICS: Fix nodiscard #152
This file contains 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: Release | |
on: | |
push: | |
branches: [main, dev] | |
env: | |
BRANCH: "main" | |
DATE_TAG: "v3.0.1" | |
jobs: | |
release-create: | |
permissions: write-all | |
runs-on: ubuntu-latest | |
outputs: | |
release: ${{ steps.release.outputs.release_tag }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- id: release | |
name: Create Release | |
if: github.repository != 'EpitechPromo2026/B-CPP-500-TLS-5-1-rtype-xavier.mitault.git' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
if [[ "${{ github.ref }}" == 'refs/heads/main' ]]; then | |
export GITHUB_OUTPUT=$GITHUB_OUTPUT | |
bash ./.github/workflows/release.sh "${{ env.BRANCH }}" | |
else | |
echo "release_tag=0.0.0" >> $GITHUB_OUTPUT | |
fi | |
test-ecs-linux: | |
runs-on: ubuntu-latest | |
needs: [release-linux] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get install xorg-dev | |
- name: Test all | |
run: ./scripts/test-all.sh | |
test-ecs-macos: | |
runs-on: macos-latest | |
needs: [release-linux] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: | | |
brew install cmake | |
brew install llvm | |
- name: Test all | |
run: ./scripts/test-all.sh | |
test-ecs-windows: | |
runs-on: windows-latest | |
needs: [release-linux] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Test all | |
run: ./scripts/test-all.ps1 | |
release-linux: | |
runs-on: ubuntu-latest | |
needs: [release-create, date-to-tar, raylib-to-tar] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Create tar | |
run: ./scripts/generate-all.sh | |
# B-luga | |
- name: B-luga Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./libs/B-luga/b-luga.tar | |
- name: B-luga Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: b-luga.tar | |
path: ./libs/B-luga/b-luga.tar | |
# B-luga-graphics | |
- name: B-luga-graphics Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./libs/B-luga-graphics/b-luga-graphics.tar | |
- name: B-luga-graphics Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: b-luga-graphics.tar | |
path: ./libs/B-luga-graphics/b-luga-graphics.tar | |
# B-luga-physics | |
- name: B-luga-physics Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./libs/B-luga-physics/b-luga-physics.tar | |
- name: B-luga-physics Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: b-luga-physics.tar | |
path: ./libs/B-luga-physics/b-luga-physics.tar | |
date-to-tar: | |
runs-on: ubuntu-latest | |
needs: release-create | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y tar git | |
- name: Get Date | |
run: | | |
git clone https://github.com/HowardHinnant/date.git date-repo | |
cd date-repo || exit 14 | |
git checkout ${{ env.DATE_TAG }} | |
cd .. | |
- name: To Tar | |
run: | | |
tar -cvf date.tar date-repo | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./date.tar | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: date.tar | |
path: ./date.tar | |
raylib-to-tar: | |
runs-on: ubuntu-latest | |
needs: release-create | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install deps | |
run: sudo apt-get update && sudo apt-get install -y tar git | |
- name: Get Raylib | |
run: | | |
git clone --recurse-submodules https://github.com/raysan5/raylib.git raylib-repo | |
cd raylib-repo || exit 14 | |
git checkout ${{ env.RAYLIB_TAG }} | |
cd .. | |
- name: To Tar | |
run: | | |
tar -cvf raylib.tar raylib-repo | |
- name: Upload To Release | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
gh release upload ${{ needs.release-create.outputs.release }} ./raylib.tar | |
- name: Upload To Artifact | |
if: github.ref != 'refs/heads/main' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: raylib.tar | |
path: ./raylib.tar |