fix double-zip issue in artifact merge job #159
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 | |
| # Controls when the workflow will run | |
| on: | |
| push: | |
| pull_request: | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| env: | |
| RAYLIB_VERSION: 5.5.0-3 | |
| jobs: | |
| build-linux: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: electronstudio/ubuntu16-modern:latest | |
| options: --user root | |
| volumes: | |
| # override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc | |
| - /tmp:/__e/node20 | |
| steps: | |
| - name: fix node | |
| run: | | |
| ln -s /usr/local/bin /__e/node20/bin | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Build raylib | |
| run: | | |
| cd raylib | |
| mkdir build | |
| cd build | |
| cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
| make -j2 | |
| make install | |
| - name: Build jaylib | |
| env: | |
| RAYLIB_PLATFORM: linux-x86_64 | |
| run: | | |
| ./build-java.sh | |
| ./build-native.sh | |
| ./build-docs.sh | |
| - name: Upload jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaylib-linux-x86_64 | |
| path: ./jaylib*.jar | |
| build-linux-32bit: | |
| runs-on: ubuntu-latest | |
| container: | |
| image: electronstudio/ubuntu16-modern:i386 | |
| options: --user root | |
| volumes: | |
| # override /__e/node20 because GitHub Actions uses a version that requires too-recent glibc | |
| - /tmp:/__e/node20 | |
| steps: | |
| - name: fix node | |
| run: | | |
| ln -s /usr/local/bin /__e/node20/bin | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - name: Build raylib | |
| run: | | |
| cd raylib | |
| mkdir build | |
| cd build | |
| cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DOPENGL_VERSION=2.1 -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
| make -j2 | |
| make install | |
| - name: Build jaylib | |
| env: | |
| RAYLIB_PLATFORM: linux-x86 | |
| run: | | |
| ./build-java.sh | |
| ./build-native.sh | |
| ./build-docs.sh | |
| - name: Upload jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaylib-linux-x86 | |
| path: ./jaylib-natives*.jar | |
| # build-linux-arm: | |
| # runs-on: rpi | |
| # | |
| # steps: | |
| # # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| # - uses: actions/checkout@v2 | |
| # with: | |
| # submodules: recursive | |
| # | |
| # | |
| # - name: Build raylib | |
| # run: | | |
| # cd raylib | |
| # mkdir build | |
| # cd build | |
| # cmake -DBUILD_EXAMPLES=off -DINCLUDE_EVERYTHING=on -DSUPPORT_FILEFORMAT_JPG=on -DWITH_PIC=on -DCMAKE_BUILD_TYPE=Release -DOpenGL_GL_PREFERENCE=GLVND .. | |
| # make -j2 | |
| # make install | |
| # | |
| # - name: Build jaylib | |
| # env: | |
| # RAYLIB_PLATFORM: linux-armhf | |
| # run: | | |
| # ./build-java.sh | |
| # ./build-native.sh | |
| # | |
| # - name: Upload jar | |
| # uses: actions/upload-artifact@v2.2.4 | |
| # with: | |
| # name: jar | |
| # path: ./*.jar | |
| build-mac: | |
| runs-on: macos-13 | |
| env: | |
| MACOSX_DEPLOYMENT_TARGET: 10.14 | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'adopt' # See 'Supported distributions' for available options | |
| java-version: '8' | |
| # build raylib for arm64 and x86_64 as well | |
| - name: Build raylib | |
| run: | | |
| cd raylib | |
| mkdir build | |
| cd build | |
| cmake -DBUILD_EXAMPLES=OFF -DCMAKE_OSX_ARCHITECTURES="arm64;x86_64" -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
| make -j2 | |
| sudo make install | |
| - name: Build jaylib | |
| env: | |
| RAYLIB_PLATFORM: macosx-x86_64 | |
| run: | | |
| ./build-java.sh | |
| ./build-native.sh | |
| - name: Upload jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaylib-macosx-x86_64 | |
| path: ./*macosx-x86_64*.jar | |
| build-windows: | |
| runs-on: windows-2022 | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'adopt' # See 'Supported distributions' for available options | |
| java-version: '8' | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v1.0.2 | |
| - name: Build raylib | |
| run: | | |
| cd raylib | |
| mkdir build | |
| cd build | |
| cmake -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
| msbuild raylib.sln /target:raylib /property:Configuration=Release | |
| copy raylib\Release\raylib.lib ..\.. | |
| cd ..\.. | |
| shell: cmd | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build jaylib | |
| env: | |
| RAYLIB_PLATFORM: windows-x86_64 | |
| run: | | |
| build-windows.bat | |
| shell: cmd | |
| - name: Upload jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaylib-windows-x86_64 | |
| path: ./jaylib-natives*.jar | |
| build-windows32: | |
| runs-on: windows-2022 | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v2 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-java@v2 | |
| with: | |
| distribution: 'adopt' # See 'Supported distributions' for available options | |
| java-version: '8' | |
| architecture: 'x86' | |
| - name: Add msbuild to PATH | |
| uses: microsoft/setup-msbuild@v2 | |
| with: | |
| msbuild-architecture: x86 | |
| - name: Build raylib | |
| run: | | |
| cd raylib | |
| mkdir build | |
| cd build | |
| cmake -A Win32 -DBUILD_EXAMPLES=OFF -DCUSTOMIZE_BUILD=ON -DOPENGL_VERSION=2.1 -DSUPPORT_FILEFORMAT_JPG=ON -DSUPPORT_FILEFORMAT_FLAC=ON -DWITH_PIC=ON -DCMAKE_BUILD_TYPE=Release .. | |
| msbuild raylib.sln /target:raylib /property:Configuration=Release | |
| copy raylib\Release\raylib.lib ..\.. | |
| cd ..\.. | |
| shell: cmd | |
| - uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x86 | |
| - name: Build jaylib | |
| env: | |
| RAYLIB_PLATFORM: windows-x86 | |
| run: | | |
| build-windows.bat | |
| shell: cmd | |
| - name: Upload jar | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaylib-windows-x86 | |
| path: ./jaylib-natives*.jar | |
| merge-artifacts: | |
| runs-on: ubuntu-latest | |
| needs: [build-linux, build-linux-32bit, build-mac, build-windows, build-windows32] | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| merge-multiple: true | |
| - name: Upload merged artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jaylib-all-platforms | |
| path: artifacts/ |