Skip to content

Commit

Permalink
Restore the default Windows build (#1839)
Browse files Browse the repository at this point in the history
* Restore the default Windows build

* Use Windows 2019 image
* Checkout full history to get build revision
* Only run sign-path build on push, not pull requests

Signed-off-by: Geoff Hutchison <[email protected]>

---------

Signed-off-by: Geoff Hutchison <[email protected]>
  • Loading branch information
ghutchis authored Dec 5, 2024
1 parent c019c51 commit 45b4c49
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 32 deletions.
49 changes: 19 additions & 30 deletions .github/workflows/build_cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ jobs:
cmake_flags: "-G Ninja -DBUILD_MOLEQUEUE=OFF",
cpack_flags: "-G DragNDrop",
}
- {
name: "Windows Latest MSVC", artifact: "Win64.exe",
os: windows-2019,
cc: "cl", cxx: "cl",
build_type: "Release",
cmake_flags: "-DBUILD_MOLEQUEUE=OFF",
build_flags: "-j 2",
cpack_flags: "-G NSIS",
}
- {
name: "Ubuntu Address Sanitizer", artifact: "",
os: ubuntu-20.04,
Expand Down Expand Up @@ -97,12 +106,6 @@ jobs:
repository: openchemistry/openchemistry
submodules: recursive

- name: Checkout avogadroapp
uses: actions/checkout@v4
with:
repository: openchemistry/avogadroapp
path: avogadroapp

- name: Checkout molecules
uses: actions/checkout@v4
with:
Expand All @@ -127,10 +130,18 @@ jobs:
repository: openchemistry/avogadro-i18n
path: avogadro-i18n

- name: Checkout avogadroapp
uses: actions/checkout@v4
with:
repository: openchemistry/avogadroapp
path: avogadroapp
fetch-depth: 0

- name: Checkout avogadrolibs
uses: actions/checkout@v4
with:
path: avogadrolibs
fetch-depth: 0

- name: Install Qt
uses: jurplel/install-qt-action@v3
Expand Down Expand Up @@ -262,7 +273,7 @@ jobs:
fi # password exists
- name: Create Mac and Windows Packages
if: matrix.config.os == 'windows-latest' || runner.os == 'macOS'
if: runner.os == 'Windows' || runner.os == 'macOS'
shell: bash
run: |
if [ -z "${P12_PASSWORD}" ]; then
Expand All @@ -271,7 +282,7 @@ jobs:
if [ -z "${OPENSSL_ROOT_DIR}" ]; then
unset OPENSSL_ROOT_DIR
fi
[[ ! "${GITHUB_REF}" =~ "tags" ]] && export SNAPSHOT_DATE=`date -j "+%d-%m-%y"`
[[ ! "${GITHUB_REF}" =~ "tags" ]] && export SNAPSHOT_DATE=`date "+%d-%m-%y"`
cpack ${{ matrix.config.cpack_flags }}
working-directory: ${{ runner.workspace }}/build/avogadroapp
continue-on-error: true
Expand Down Expand Up @@ -328,28 +339,6 @@ jobs:
path: ${{ runner.workspace }}/build/avogadroapp/Avogadro*.*
name: ${{ matrix.config.artifact }}

- name: Sign Windows artifact
if: matrix.config.os == 'windows-latest' && github.ref == 'refs/heads/master'
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: '${{ secrets.SIGNPATH_API_TOKEN }}'
organization-id: '${{ secrets.SIGNPATH_ORG_ID }}'
project-slug: 'avogadrolibs'
signing-policy-slug: 'test-signing'
github-artifact-id: '${{ steps.upload-artifact.outputs.artifact-id }}'
wait-for-completion: true
output-artifact-directory: '${{ runner.workspace }}/build/avogadroapp'

- name: Notarize Mac DMG
if: matrix.config.os == 'windows-latest' && github.ref == 'refs/heads/master'
run: |
ls -la ./
working-directory: ${{ runner.workspace }}/build/avogadroapp

- name: Setup tmate session
if: failure()
uses: mxschmitt/action-tmate@v3

- name: Cleanup
if: ${{ always() }} # To ensure this step runs even when earlier steps fail
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ name: CMake Windows Build
# .. since SignPath requires only a Windows build in the action
# .. to successfully sign

on: [push, pull_request, workflow_dispatch]
on: [push, workflow_dispatch]

env:
QT_VERSION: 5.15.2
Expand All @@ -31,7 +31,7 @@ jobs:
cc: "cl", cxx: "cl",
build_type: "Release",
cmake_flags: "-DBUILD_MOLEQUEUE=OFF",
build_flags: "-j 2",
build_flags: "",
cpack_flags: "-G NSIS",
}

Expand Down

0 comments on commit 45b4c49

Please sign in to comment.