diff --git a/.github/workflows/CMake-MSVC-noyasm.yml b/.github/workflows/CMake-MSVC-noyasm.yml index 0641ded0..d2766485 100644 --- a/.github/workflows/CMake-MSVC-noyasm.yml +++ b/.github/workflows/CMake-MSVC-noyasm.yml @@ -1,24 +1,30 @@ -name: CMake MSVC noyasm - -on: push - -jobs: - build: - defaults: - run: - shell: cmd - strategy: - matrix: - # currently windows-latest==windows-2022 - # windows-2022: VS2022 - # windows-2019: VS2019 - os: [windows-2022, windows-2019] - arch: [Win32, x64, ARM, ARM64] - shared: [ON, OFF] - runs-on: ${{ matrix.os }} - steps: - - uses: actions/checkout@v3 - - name: CMake - run: cd ports\cmake && cmake -A ${{ matrix.arch }} -DBUILD_SHARED_LIBS=${{ matrix.shared }} . - - name: CMake --build - run: cd ports\cmake && cmake --build . +name: CMake MSVC noyasm + +on: push + +jobs: + build: + defaults: + run: + shell: cmd + strategy: + matrix: + # currently windows-latest==windows-2022 + # windows-2022: VS2022 + # windows-2019: VS2019 + os: [windows-2022, windows-2019] + arch: [x86, x64, amd64_arm, amd64_arm64] + shared: [ON, OFF] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v3 + - name: Setup vcvars + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + - name: Install ninja + uses: turtlesec-no/get-ninja@main + - name: CMake (configure) + run: cmake -S ports\cmake -B build -GNinja -DBUILD_SHARED_LIBS=${{ matrix.shared }} . + - name: CMake --build + run: cmake --build build diff --git a/.github/workflows/CMake-MSVC.yml b/.github/workflows/CMake-MSVC.yml index 6c9f70c0..85ca08bd 100644 --- a/.github/workflows/CMake-MSVC.yml +++ b/.github/workflows/CMake-MSVC.yml @@ -19,19 +19,27 @@ jobs: with: repository: yasm/yasm path: yasm-src - - name: Build and install yasm - if: ${{ !steps.restore-yasm.outputs.cache-hit }} - run: | - cmake -S yasm-src -B yasm-build -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/yasm -DCMAKE_INSTALL_LIBDIR=bin -DCMAKE_INSTALL_BINDIR=bin -A x64 -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded - cmake --build yasm-build --parallel --config Release - cmake --install yasm-build --config Release - - name: Cache yasm - if: ${{ !steps.restore-yasm.outputs.cache-hit }} - uses: actions/cache/save@v3 - with: - path: | - ${{ github.workspace }}/yasm - key: yasm + - name: Setup vcvars + if: ${{ !steps.restore-yasm.outputs.cache-hit }} + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: x64 + - name: Install ninja + if: ${{ !steps.restore-yasm.outputs.cache-hit }} + uses: turtlesec-no/get-ninja@main + - name: Build and install yasm + if: ${{ !steps.restore-yasm.outputs.cache-hit }} + run: | + cmake -S yasm-src -B yasm-build -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/yasm -DCMAKE_INSTALL_LIBDIR=bin -DCMAKE_INSTALL_BINDIR=bin -A x64 -DCMAKE_WINDOWS_EXPORT_ALL_SYMBOLS=ON -DCMAKE_POLICY_DEFAULT_CMP0091=NEW -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded + cmake --build yasm-build --parallel + cmake --install yasm-build + - name: Cache yasm + if: ${{ !steps.restore-yasm.outputs.cache-hit }} + uses: actions/cache/save@v3 + with: + path: | + ${{ github.workspace }}/yasm + key: yasm build: defaults: run: @@ -56,9 +64,15 @@ jobs: path: | ${{ github.workspace }}/yasm key: yasm - - name: add yasm to PATH + - name: Add yasm to PATH run: echo "${{ github.workspace }}/yasm/bin" >> %GITHUB_PATH%" - - name: CMake - run: cmake -S ports/cmake -B build -DYASM_ASSEMBLER=${{ github.workspace }}/yasm/bin/vsyasm.exe -DBUILD_SHARED_LIBS=${{ matrix.shared }} - - name: CMake --build + - name: Setup vcvars + uses: ilammy/msvc-dev-cmd@v1 + with: + arch: ${{ matrix.arch }} + - name: Install ninja + uses: turtlesec-no/get-ninja@main + - name: CMake (configure) + run: cmake -S ports/cmake -B build -GNinja -DYASM_ASSEMBLER=${{ github.workspace }}/yasm/bin/vsyasm.exe -DBUILD_SHARED_LIBS=${{ matrix.shared }} + - name: CMake (Build) run: cmake --build build --verbose