Skip to content

Commit

Permalink
remove windows release because it's ridiculous
Browse files Browse the repository at this point in the history
  • Loading branch information
tjira committed Apr 22, 2024
1 parent 9b98275 commit 13d293b
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 69 deletions.
61 changes: 1 addition & 60 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,47 +58,9 @@ jobs:
bin/libfftw_linux_x86-64.a
bin/libint_linux_x86-64.a
build_windows_x86-64:
runs-on: windows-latest

steps:
- uses: actions/checkout@v4

- name: Install Packages
run: pip install jinja2

- name: Configure Acorn
run: cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=g++ -DSTANDALONE=ON

- name: Build Acorn
run: cmake --build build --parallel 2

- name: Rename Binaries
run: |
mv bin/acorn_centerxyz.exe bin/acorn_centerxyz_windows_x86-64.exe
mv bin/acorn_view.exe bin/acorn_view_windows_x86-64.exe
mv bin/acorn_makemov.exe bin/acorn_makemov_windows_x86-64.exe
mv bin/acorn.exe bin/acorn_windows_x86-64.exe
mv bin/libacorn.a bin/libacorn_windows_x86-64.a
mv bin/libfftw3.a bin/libfftw_windows_x86-64.a
mv bin/libint2.a bin/libint_windows_x86-64.a
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: windows
path: |
bin/acorn_centerxyz_windows_x86-64.exe
bin/acorn_makemov_windows_x86-64.exe
bin/acorn_view_windows_x86-64.exe
bin/acorn_windows_x86-64.exe
bin/libacorn_windows_x86-64.a
bin/libfftw_windows_x86-64.a
bin/libint_windows_x86-64.a
release:
runs-on: ubuntu-latest
needs: [build_linux_x86-64, build_windows_x86-64]
needs: [build_linux_x86-64]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -129,30 +91,9 @@ jobs:
run: |
tar -czf acorn_linux_x86-64.tar.gz acorn acorn_centerxyz acorn_makemov acorn_view basis example interface library script/compress.py script/decompress.py script/plotmat.py script/plottraj.py script/plotwfn.py LICENSE.md
- name: Copy x86-64 Windows Binaries to the Root Folder
run: |
cp windows/acorn_centerxyz_windows_x86-64.exe acorn_centerxyz.exe
cp windows/acorn_makemov_windows_x86-64.exe acorn_makemov.exe
cp windows/acorn_view_windows_x86-64.exe acorn_view.exe
cp windows/acorn_windows_x86-64.exe acorn.exe
cp windows/libacorn_windows_x86-64.a library/libacorn.a
cp windows/libfftw_windows_x86-64.a library/libfftw.a
cp windows/libint_windows_x86-64.a library/libint.a
- name: Create x86-64 Windows Packages
run: |
tar -czf acorn_windows_x86-64.tar.gz acorn.exe acorn_centerxyz.exe acorn_makemov.exe acorn_view.exe basis example interface library script/compress.py script/decompress.py script/plotmat.py script/plottraj.py script/plotwfn.py LICENSE.md
- name: Release linux_x86-64 Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn_linux_x86-64.tar.gz
tag: ${{github.ref}}

- name: Release windows_x86-64 Version of Acorn
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{secrets.GITHUB_TOKEN}}
file: acorn_windows_x86-64.tar.gz
tag: ${{github.ref}}
9 changes: 1 addition & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,11 @@ set(GLFW_BUILD_TESTS OFF)
set(GLFW_BUILD_DOCS OFF)

# set compile flags
set(CMAKE_CXX_FLAGS_RELEASE "-mavx -s -O3 -Wall -Wextra")
set(CMAKE_CXX_FLAGS_DEBUG "-g -pg -Og -Wall -Wextra")
set(CMAKE_CXX_FLAGS_RELEASE "-s -O3 -Wall -Wextra")
if (WIN32)
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -mwindows -static -Wa,-mbig-obj")
string(APPEND CMAKE_CXX_FLAGS_DEBUG " -mwindows -static -Wa,-mbig-obj")
else()
string(APPEND CMAKE_CXX_FLAGS_RELEASE " -mavx")
endif()

# include fetch content module
Expand All @@ -55,11 +53,6 @@ FetchContent_Declare(fftw SYSTEM DOWNLOAD_EXTRACT_TIMESTAMP TRUE URL https://www
FetchContent_MakeAvailable(argparse exprtk glad glfw glm fftw json)
if (STANDALONE)
FetchContent_MakeAvailable(eigen libint)
if (WIN32)
file(READ ${libint_SOURCE_DIR}/include/libint2/boys.h CONTENT)
string(REPLACE "#ifdef _MSC_VER" "#ifdef WIN32" CONTENT "${CONTENT}")
file(WRITE ${libint_SOURCE_DIR}/include/libint2/boys.h "${CONTENT}")
endif()
endif()

# generate glad library
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ After the compilation the bin folder will be created along with the executables.

### Windows

On Windows, the libint library can not be generated, so official release is used. Keep in mind that the windows version can be slightly different, because it uses different version of the library. To configure the project execute the following command.
On Windows, the libint library can not be generated, so the official release is used. Keep in mind that the windows version can be slightly different, because it uses different version of the library. To configure the project execute the following command.

```bash
cmake -B build -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DSTANDALONE=ON
Expand Down

0 comments on commit 13d293b

Please sign in to comment.