vcpkg update for llvm-18 (#36) #270
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: Build | |
on: | |
push: | |
branches: | |
- master | |
tags: | |
- "*" | |
pull_request: | |
schedule: | |
# Every week | |
- cron: "0 0 * * 0" | |
jobs: | |
build: | |
strategy: | |
matrix: | |
platform: [ubuntu-latest, windows-latest, macos-13, macos-14] | |
include: | |
- platform: ubuntu-latest | |
configure_preset: "static" | |
build_preset: "static-release" | |
release_name: "linux-x86-64" | |
cc: "gcc-13" | |
cxx: "g++-13" | |
- platform: windows-latest | |
configure_preset: "windows-static" | |
build_preset: "windows-static-release" | |
release_name: "windows-x64" | |
- platform: macos-13 | |
configure_preset: "default" | |
build_preset: "release" | |
release_name: "macos-x64" | |
cc: "/usr/local/opt/llvm/bin/clang" | |
cxx: "/usr/local/opt/llvm/bin/clang++" | |
- platform: macos-14 | |
configure_preset: "default" | |
build_preset: "release" | |
release_name: "macos-arm64" | |
cc: "/opt/homebrew/opt/llvm/bin/clang" | |
cxx: "/opt/homebrew/opt/llvm/bin/clang++" | |
runs-on: ${{matrix.platform}} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "true" | |
- uses: lukka/get-cmake@latest | |
- name: Run vcpkg | |
uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgJsonGlob: "vcpkg.json" | |
- name: Install requirements | |
run: sudo apt install libfuse-dev gcc-13 g++-13 | |
if: matrix.platform == 'ubuntu-latest' | |
- name: Install requirements (MacOS) | |
run: | | |
brew update | |
# Temporary fix, see https://github.com/actions/setup-python/issues/577 | |
rm /usr/local/bin/2to3 || true | |
rm /usr/local/bin/idle3 || true | |
rm /usr/local/bin/pydoc3 || true | |
rm /usr/local/bin/python3 || true | |
rm /usr/local/bin/python3-config || true | |
brew install llvm | |
brew install macfuse | |
shell: bash | |
if: matrix.platform == 'macos-13' | |
- name: Install requirements (MacOS arm64) | |
run: | | |
brew update | |
brew install llvm | |
brew install macfuse | |
shell: bash | |
if: matrix.platform == 'macos-14' | |
- name: Set compiler | |
run: | | |
echo "CC=${{matrix.cc}}" >> $GITHUB_ENV | |
echo "CXX=${{matrix.cxx}}" >> $GITHUB_ENV | |
shell: bash | |
if: matrix.cc != '' | |
- name: Run cmake | |
uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: ${{matrix.configure_preset}} | |
buildPreset: ${{matrix.build_preset}} | |
- name: Upload wfs-extract | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wfs-extract-${{matrix.release_name}} | |
path: build/${{matrix.configure_preset}}/wfs-extract/Release | |
- name: Upload wfs-file-injector | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wfs-file-injector-${{matrix.release_name}} | |
path: build/${{matrix.configure_preset}}/wfs-file-injector/Release | |
- name: Upload wfs-fuse | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wfs-fuse-${{matrix.release_name}} | |
path: build/${{matrix.configure_preset}}/wfs-fuse/Release | |
if: matrix.platform != 'windows-latest' | |
- name: Upload wfs-info | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wfs-info-${{matrix.release_name}} | |
path: build/${{matrix.configure_preset}}/wfs-info/Release | |
- name: Upload wfs-reencryptor | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wfs-reencryptor-${{matrix.release_name}} | |
path: build/${{matrix.configure_preset}}/wfs-reencryptor/Release | |
- name: Prepare Release Windows | |
run: powershell Compress-Archive -Path build\${{matrix.configure_preset}}\wfs-file-injector\Release\wfs-file-injector.exe, build\${{matrix.configure_preset}}\wfs-extract\Release\wfs-extract.exe, build\${{matrix.configure_preset}}\wfs-info\Release\wfs-info.exe, build\${{matrix.configure_preset}}\wfs-reencryptor\Release\wfs-reencryptor.exe -DestinationPath wfs-tools-${{github.ref_name}}-${{matrix.release_name}}.zip | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && matrix.platform == 'windows-latest' | |
- name: Prepare Release Linux & MacOS | |
run: zip -r -j wfs-tools-${{github.ref_name}}-${{matrix.release_name}}.zip build/${{matrix.configure_preset}}/wfs-file-injector/Release/wfs-file-injector build/${{matrix.configure_preset}}/wfs-extract/Release/wfs-extract build/${{matrix.configure_preset}}/wfs-fuse/Release/wfs-fuse build/${{matrix.configure_preset}}/wfs-info/Release/wfs-info build/${{matrix.configure_preset}}/wfs-reencryptor/Release/wfs-reencryptor | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') && matrix.platform != 'windows-latest' | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | |
with: | |
files: wfs-tools-${{github.ref_name}}-${{matrix.release_name}}.zip |