diff --git a/.github/workflows/build-cpp.yml b/.github/workflows/build-cpp.yml index 35c1c56d4..8f85c1407 100644 --- a/.github/workflows/build-cpp.yml +++ b/.github/workflows/build-cpp.yml @@ -10,10 +10,6 @@ on: pull_request: workflow_dispatch: -defaults: - run: - shell: bash - jobs: generate-schemas: uses: ./.github/workflows/generate_schemas.yml @@ -96,8 +92,9 @@ jobs: name: libbitwarden_c_files-${{ matrix.settings.target }} path: languages/cpp/include - - name: Build + - name: Build unix working-directory: languages/cpp + if: runner.os == 'macOS' || runner.os == 'Linux' run: | if [[ '${{ runner.os }}' == 'macOS' ]]; then export DNLOHMANN_PATH=/usr/local/opt/nlohmann-json @@ -109,11 +106,6 @@ jobs: export DBOOST_PATH=/usr/share/doc/libboost-all-dev fi - if [[ '${{ runner.os }}' == 'Windows' ]]; then - export DNLOHMANN_PATH=C:\Users\runneradmin\miniconda3\envs\conda-env\nlohmann_json - export DBOOST_PATH=C:\Users\runneradmin\miniconda3\envs\conda-env\boost - fi - ls include mkdir build @@ -121,6 +113,18 @@ jobs: cmake .. -DNLOHMANN=$DNLOHMANN_PATH -DBOOST=$DBOOST_PATH -DTARGET=include/libbitwarden_c.dylib cmake --build . + - name: Build windows + if: runner.os == 'Windows' + working-directory: languages/cpp + run: | + set DNLOHMANN_PATH=C:\Users\runneradmin\miniconda3\envs\conda-env\nlohmann_json + set DBOOST_PATH=C:\Users\runneradmin\miniconda3\envs\conda-env\boost + + mkdir build + cd build + cmake .. -DNLOHMANN=$DNLOHMANN_PATH -DBOOST=$DBOOST_PATH -DTARGET=include/libbitwarden_c.dll + cmake --build . + - name: Upload C++ package for ${{ matrix.settings.target }} uses: actions/upload-artifact@5d5d22a31266ced268874388b861e4b58bb5c2f3 # v4.3.1 with: