CI: install time and p7zip-full #83
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: Continuous Integration | |
| on: | |
| push: | |
| paths: | |
| - "**.c" | |
| - "**.h" | |
| - "**.cpp" | |
| - "**.hpp" | |
| - "**.build" | |
| - "**.in" | |
| - "**.yml" | |
| pull_request: | |
| paths: | |
| - "**.c" | |
| - "**.h" | |
| - "**.cpp" | |
| - "**.hpp" | |
| - "**.build" | |
| - "**.in" | |
| - "**.yml" | |
| env: | |
| CMAKE_GENERATOR: Ninja | |
| HOMEBREW_NO_ANALYTICS: 1 | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| HOMEBREW_NO_INSTALL_UPGRADE: 1 | |
| HOMEBREW_NO_INSTALL_CLEANUP: 1 | |
| DEBIAN_FRONTEND: noninteractive | |
| TZ: Japan | |
| jobs: | |
| build-ubuntu: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| container: | |
| image: ubuntu:20.04 | |
| options: "--user 0" | |
| steps: | |
| - name: Install build dependancies | |
| run: | | |
| apt-get -y update | |
| apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install build-essential expect pkg-config fuse libfuse-dev git time p7zip-full | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.13.3" | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip | |
| restore-keys: | | |
| ${{ runner.os }}-pip | |
| - run: python -m pip install --upgrade meson ninja | |
| - name: Build pfsshell | |
| run: | | |
| meson setup build/ -Denable_pfs2tar=true | |
| meson compile -C build | |
| - name: Run Test | |
| run: | | |
| cd test | |
| time ./pfsshell_test.tcl | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pfsshell-ubuntu | |
| path: | | |
| build/pfsshell | |
| build/pfs2tar | |
| - name: Build pfsfuse | |
| run: | | |
| rm -rf build/ | |
| meson setup build/ -Denable_pfsfuse=true | |
| meson compile -C build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pfsfuse-ubuntu | |
| path: build/pfsfuse | |
| build-win32: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| container: | |
| image: ubuntu:20.04 | |
| options: "--user 0" | |
| steps: | |
| - run: | | |
| apt-get -y update | |
| apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install build-essential mingw-w64 git p7zip-full | |
| update-alternatives --set i686-w64-mingw32-gcc /usr/bin/i686-w64-mingw32-gcc-posix | |
| update-alternatives --set i686-w64-mingw32-g++ /usr/bin/i686-w64-mingw32-g++-posix | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.13.3" | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip | |
| restore-keys: | | |
| ${{ runner.os }}-pip | |
| - run: python -m pip install --upgrade meson ninja | |
| - run: | | |
| meson setup build/ -Denable_pfs2tar=true --cross-file ./external/meson_toolchains/mingw32_meson.ini | |
| meson compile -C build archive | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pfsshell-win32 | |
| path: build/*.7z | |
| build-pfsfuse-win32: | |
| runs-on: windows-latest | |
| timeout-minutes: 20 | |
| defaults: | |
| run: | |
| shell: msys2 {0} | |
| steps: | |
| - name: Install MSYS2 packages | |
| uses: msys2/setup-msys2@v2 | |
| with: | |
| msystem: MINGW32 | |
| install: | | |
| base-devel git make texinfo patch binutils mpc-devel p7zip mingw-w64-i686-gcc | |
| mingw-w64-i686-cmake mingw-w64-i686-make mingw-w64-i686-meson | |
| update: true | |
| shell: msys2 {0} | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - name: Enable git symlinks | |
| run: | | |
| git config core.symlinks true | |
| git reset --hard | |
| - name: Build pfsfuse | |
| run: | | |
| meson setup build/ -Denable_pfsfuse=true | |
| meson compile -C build | |
| cp -f external/dokany/license.lgpl.txt build/ | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pfsfuse-win32 | |
| path: | | |
| build/pfsfuse.exe | |
| build/libdokanfuse*.dll | |
| build/license.lgpl.txt | |
| build-macos: | |
| runs-on: macos-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| submodules: recursive | |
| - uses: actions/setup-python@v3 | |
| with: | |
| python-version: "3.x" | |
| - uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip | |
| restore-keys: | | |
| ${{ runner.os }}-pip | |
| - run: python -m pip install --upgrade meson ninja | |
| - run: brew install macfuse coreutils | |
| - run: | | |
| meson setup build/ -Denable_pfs2tar=true | |
| meson compile -C build | |
| - name: Run Test | |
| run: | | |
| cd test | |
| time ./pfsshell_test.tcl | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pfsshell-macos | |
| path: | | |
| build/pfsshell | |
| build/pfs2tar | |
| - run: | | |
| rm -rf build/ | |
| meson setup build/ -Denable_pfsfuse=true | |
| meson compile -C build | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: pfsfuse-macos | |
| path: build/pfsfuse | |
| create-release: | |
| needs: [build-ubuntu, build-win32, build-macos, build-pfsfuse-win32] | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| container: | |
| image: ubuntu:20.04 | |
| options: "--user 0" | |
| if: startsWith(github.ref, 'refs/tags/v') || github.ref == 'refs/heads/master' | |
| steps: | |
| - name: Download all artifact | |
| uses: actions/download-artifact@v4 | |
| - name: Install build dependancies | |
| run: | | |
| apt-get -y update | |
| apt-get -y -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' install p7zip-full | |
| - name: Prepare artifacts for release | |
| run: | | |
| 7z a -tzip pfsshell-ubuntu.zip pfsshell-ubuntu/* | |
| 7z a -tzip pfsshell-macos.zip pfsshell-macos/* | |
| 7z a -tzip pfsfuse-ubuntu.zip pfsfuse-ubuntu/* | |
| 7z a -tzip pfsfuse-macos.zip pfsfuse-macos/* | |
| 7z a -tzip pfsfuse-win32.zip pfsfuse-win32/* | |
| - name: Create prerelease | |
| if: github.ref == 'refs/heads/master' | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| prerelease: true | |
| automatic_release_tag: "latest" | |
| title: "Latest development builds" | |
| files: | | |
| pfsshell-win32/* | |
| pfsfuse-win32.zip | |
| pfsshell-ubuntu.zip | |
| pfsshell-macos.zip | |
| pfsfuse-ubuntu.zip | |
| pfsfuse-macos.zip | |
| - name: Create release | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| uses: marvinpinto/action-automatic-releases@latest | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| prerelease: "${{ contains(github.ref, '-rc') }}" | |
| files: | | |
| pfsshell-win32/* | |
| pfsfuse-win32.zip | |
| pfsshell-ubuntu.zip | |
| pfsshell-macos.zip | |
| pfsfuse-ubuntu.zip | |
| pfsfuse-macos.zip |