diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7adab0a..3f16f98 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -6,24 +6,23 @@ on: pull_request: branches: [ "master" ] -# https://devblogs.microsoft.com/cppblog/vcpkg-integration-with-the-github-dependency-graph/ -permissions: - contents: write - env: - # https://devblogs.microsoft.com/cppblog/vcpkg-integration-with-the-github-dependency-graph/ - GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} - VCPKG_ROOT: "C:/my-vcpkg" VCPKG_DEFAULT_BINARY_CACHE: "C:/vcpkg-binary-cache" - VCPKG_FEATURE_FLAGS: dependencygraph - BUILD_TYPE: RelWithDebInfo jobs: build: runs-on: windows-2022 + strategy: + matrix: + arch: [ x64, x86 ] steps: - uses: actions/checkout@v4 + - name: Setup Developer Command Prompt + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + - name: Get project vcpkg baseline shell: pwsh run: | @@ -33,14 +32,14 @@ jobs: - name: Cache vcpkg uses: actions/cache@v4 with: - key: vcpkg-${{ hashFiles('vcpkg.json') }} + key: vcpkg-${{ matrix.arch }}-${{ hashFiles('vcpkg.json') }} path: | ${{env.VCPKG_DEFAULT_BINARY_CACHE}} - name: Setup vcpkg run: | - New-Item -ItemType Directory -Path ${{env.VCPKG_ROOT}} - Set-Location -Path ${{env.VCPKG_ROOT}} + New-Item -ItemType Directory -Path C:/my-vcpkg + Set-Location -Path C:/my-vcpkg git init git remote add --no-tags origin https://github.com/microsoft/vcpkg.git git fetch --depth 1 --no-write-fetch-head origin ${{env.VCPKG_BASELINE}} @@ -48,25 +47,49 @@ jobs: git checkout ./bootstrap-vcpkg.bat New-Item -ItemType Directory -Path ${{env.VCPKG_DEFAULT_BINARY_CACHE}} -Force + echo "VCPKG_ROOT=C:/my-vcpkg" >> $env:GITHUB_ENV - name: Configure CMake - run: cmake -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} --toolchain ${{env.VCPKG_ROOT}}/scripts/buildsystems/vcpkg.cmake + run: cmake --preset ${{ matrix.arch }}-release - name: Build - run: cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} + run: cmake --build ${{github.workspace}}/build/${{ matrix.arch }}-release - name: Pack run: | - cd ${{github.workspace}}/build - cpack --config CPackConfig.cmake -C ${{env.BUILD_TYPE}} + cd ${{github.workspace}}/build/${{ matrix.arch }}-release + cpack --config CPackConfig.cmake -C RelWithDebInfo + + - name: Upload artifacts + uses: actions/upload-artifact@v4 + with: + name: observer-modules-${{ matrix.arch }} + path: ${{github.workspace}}/build/${{ matrix.arch }}-release/*.zip - - name: Release nightly build - uses: andelf/nightly-release@main - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} + release: + needs: build + runs-on: ubuntu-latest + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + steps: + - name: Download all artifacts + uses: actions/download-artifact@v4 with: - name: 'Nightly Release $$' - body: 'This is an automated nightly build. Download the *-dll.zip files if you need Observer modules. Download the *-pdb.zip files if you need debug symbols.' - tag_name: nightly + merge-multiple: true + path: ./artifacts + + - name: Generate release tag + id: tag + run: echo "tag=$(date +'%Y%m%d-%H%M%S')" >> $GITHUB_OUTPUT + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + tag_name: release-${{ steps.tag.outputs.tag }} + name: 'Release ${{ steps.tag.outputs.tag }}' + body: | + Automated release from master branch. + + Download the *-dll.zip files if you need Observer modules. + Download the *-pdb.zip files if you need debug symbols. + files: ./artifacts/*.zip prerelease: false - files: | - ./build/*.zip diff --git a/.idea/cmake.xml b/.idea/cmake.xml deleted file mode 100644 index 090753e..0000000 --- a/.idea/cmake.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - \ No newline at end of file diff --git a/.idea/dictionaries/project.xml b/.idea/dictionaries/project.xml index cfd78c7..7fbe760 100644 --- a/.idea/dictionaries/project.xml +++ b/.idea/dictionaries/project.xml @@ -3,23 +3,33 @@ andelf auriemma + birkenfeld bstatic + catchorg debugfarhome dependencygraph dest funcs + ilammy + lazyhamster + luxrck makemoduleversion + mateidavid nomoreitems popd pushd + refaim's ren' renpy rgssad rpatool rpgmaker + shizmob + softprops strbuf thirdparty userabort + vcvars wstring xxhash zanzapak diff --git a/.idea/runConfigurations/Far_Manager__Debug_.xml b/.idea/runConfigurations/Far_Manager__Debug_.xml index 84791f8..3fe8131 100644 --- a/.idea/runConfigurations/Far_Manager__Debug_.xml +++ b/.idea/runConfigurations/Far_Manager__Debug_.xml @@ -1,5 +1,5 @@ - + diff --git a/.idea/runConfigurations/Far_Manager__Release_.xml b/.idea/runConfigurations/Far_Manager__Release_.xml index ec1a695..3da7b08 100644 --- a/.idea/runConfigurations/Far_Manager__Release_.xml +++ b/.idea/runConfigurations/Far_Manager__Release_.xml @@ -1,5 +1,5 @@ - + diff --git a/.idea/runConfigurations/Run_Tests.xml b/.idea/runConfigurations/Run_Tests.xml index da68c74..b5dd467 100644 --- a/.idea/runConfigurations/Run_Tests.xml +++ b/.idea/runConfigurations/Run_Tests.xml @@ -1,5 +1,5 @@ - +