11name : Release
2+
23on :
34 push :
45 # Sequence of patterns matched against refs/tags
56 tags :
67 - ' v*' # Push events to matching v*, i.e. v1.0, v2023.11.15
8+
79jobs :
8- build :
9- name : GALAHAD -- Release ${{ github.ref_name }}
10+ build-linux :
11+ name : GALAHAD -- Linux -- Release ${{ github.ref_name }}
1012 runs-on : ubuntu-latest
1113 steps :
1214 - name : Checkout GALAHAD
@@ -26,24 +28,110 @@ jobs:
2628 run : |
2729 julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
2830 julia --color=yes .github/julia/build_tarballs.jl x86_64-linux-gnu-libgfortran5 --verbose
29- rm -r ~/.julia
31+ - name : Archive artifact
32+ run : julia --color=yes .github/julia/generate_binaries.jl
33+ - name : Upload artifact
34+ uses : actions/upload-artifact@v4
35+ with :
36+ name : GALAHAD_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
37+ path : ./GALAHAD_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
38+
39+ build-windows :
40+ name : GALAHAD -- Windows -- Release ${{ github.ref_name }}
41+ runs-on : ubuntu-latest
42+ steps :
43+ - name : Checkout GALAHAD
44+ uses : actions/checkout@v4
45+ - name : Install Julia
46+ uses : julia-actions/setup-julia@v2
47+ with :
48+ version : " 1.7"
49+ arch : x64
50+ - name : Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, GALAHAD_RELEASE, GALAHAD_COMMIT
51+ shell : bash
52+ run : |
53+ echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
54+ echo "GALAHAD_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
55+ echo "GALAHAD_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
3056 - name : Cross-compilation of GALAHAD -- x86_64-w64-mingw32-libgfortran5
3157 run : |
3258 julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
3359 julia --color=yes .github/julia/build_tarballs.jl x86_64-w64-mingw32-libgfortran5 --verbose
34- rm -r ~/.julia
60+ - name : Archive artifact
61+ run : julia --color=yes .github/julia/generate_binaries.jl
62+ - name : Upload artifact
63+ uses : actions/upload-artifact@v4
64+ with :
65+ name : GALAHAD_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
66+ path : ./GALAHAD_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
67+
68+ build-mac-intel :
69+ name : GALAHAD -- macOS (Intel) -- Release ${{ github.ref_name }}
70+ runs-on : ubuntu-latest
71+ steps :
72+ - name : Checkout GALAHAD
73+ uses : actions/checkout@v4
74+ - name : Install Julia
75+ uses : julia-actions/setup-julia@v2
76+ with :
77+ version : " 1.7"
78+ arch : x64
79+ - name : Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, GALAHAD_RELEASE, GALAHAD_COMMIT
80+ shell : bash
81+ run : |
82+ echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
83+ echo "GALAHAD_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
84+ echo "GALAHAD_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
3585 - name : Cross-compilation of GALAHAD -- x86_64-apple-darwin-libgfortran5
3686 run : |
3787 julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
3888 julia --color=yes .github/julia/build_tarballs.jl x86_64-apple-darwin-libgfortran5 --verbose
39- rm -r ~/.julia
89+ - name : Archive artifact
90+ run : julia --color=yes .github/julia/generate_binaries.jl
91+ - name : Upload artifact
92+ uses : actions/upload-artifact@v4
93+ with :
94+ name : GALAHAD_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
95+ path : ./GALAHAD_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
96+
97+ build-mac-arm :
98+ name : GALAHAD -- macOS (ARM) -- Release ${{ github.ref_name }}
99+ runs-on : ubuntu-latest
100+ steps :
101+ - name : Checkout GALAHAD
102+ uses : actions/checkout@v4
103+ - name : Install Julia
104+ uses : julia-actions/setup-julia@v2
105+ with :
106+ version : " 1.7"
107+ arch : x64
108+ - name : Set the environment variables BINARYBUILDER_AUTOMATIC_APPLE, GALAHAD_RELEASE, GALAHAD_COMMIT
109+ shell : bash
110+ run : |
111+ echo "BINARYBUILDER_AUTOMATIC_APPLE=true" >> $GITHUB_ENV
112+ echo "GALAHAD_RELEASE=${{ github.ref_name }}" >> $GITHUB_ENV
113+ echo "GALAHAD_COMMIT=${{ github.sha }}" >> $GITHUB_ENV
40114 - name : Cross-compilation of GALAHAD -- aarch64-apple-darwin-libgfortran5
41115 run : |
42116 julia --color=yes -e 'using Pkg; Pkg.add("BinaryBuilder")'
43117 julia --color=yes .github/julia/build_tarballs.jl aarch64-apple-darwin-libgfortran5 --verbose
44- rm -r ~/.julia
45- - name : Generate the binaries
118+ - name : Archive artifact
46119 run : julia --color=yes .github/julia/generate_binaries.jl
120+ - name : Upload artifact
121+ uses : actions/upload-artifact@v4
122+ with :
123+ name : GALAHAD_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
124+ path : ./GALAHAD_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
125+
126+ release :
127+ name : Create Release and Upload Binaries
128+ needs : [build-linux, build-windows, build-mac-intel, build-mac-arm]
129+ runs-on : ubuntu-latest
130+ steps :
131+ - name : Download artifacts
132+ uses : actions/download-artifact@v4
133+ with :
134+ path : ./artifacts
47135 - name : Create a new release
48136 uses : actions/create-release@v1
49137 id : create_release
52140 prerelease : false
53141 release_name : ${{ github.ref_name }}
54142 tag_name : ${{ github.ref_name }}
55- body :
143+ body : " Release ${{ github.ref_name }} "
56144 env :
57145 GITHUB_TOKEN : ${{ github.token }}
58146 - name : upload Linux artifact
61149 GITHUB_TOKEN : ${{ github.token }}
62150 with :
63151 upload_url : ${{ steps.create_release.outputs.upload_url }}
64- asset_path : ./GALAHAD_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
152+ asset_path : ./artifacts/ GALAHAD_binaries.${{ github.ref_name }}.x86_64-linux-gnu-libgfortran5.tar.gz
65153 asset_name : GALAHAD.${{ github.ref_name }}.linux.tar.gz
66154 asset_content_type : application/gzip
67155 - name : upload Mac (Intel) artifact
70158 GITHUB_TOKEN : ${{ github.token }}
71159 with :
72160 upload_url : ${{ steps.create_release.outputs.upload_url }}
73- asset_path : ./GALAHAD_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
161+ asset_path : ./artifacts/ GALAHAD_binaries.${{ github.ref_name }}.x86_64-apple-darwin-libgfortran5.tar.gz
74162 asset_name : GALAHAD.${{ github.ref_name }}.mac-intel.tar.gz
75163 asset_content_type : application/gzip
76164 - name : upload Mac (ARM) artifact
79167 GITHUB_TOKEN : ${{ github.token }}
80168 with :
81169 upload_url : ${{ steps.create_release.outputs.upload_url }}
82- asset_path : ./GALAHAD_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
170+ asset_path : ./artifacts/ GALAHAD_binaries.${{ github.ref_name }}.aarch64-apple-darwin-libgfortran5.tar.gz
83171 asset_name : GALAHAD.${{ github.ref_name }}.mac-arm.tar.gz
84172 asset_content_type : application/gzip
85173 - name : upload Windows artifact
88176 GITHUB_TOKEN : ${{ github.token }}
89177 with :
90178 upload_url : ${{ steps.create_release.outputs.upload_url }}
91- asset_path : ./GALAHAD_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
179+ asset_path : ./artifacts/ GALAHAD_binaries.${{ github.ref_name }}.x86_64-w64-mingw32-libgfortran5.zip
92180 asset_name : GALAHAD.${{ github.ref_name }}.windows.zip
93181 asset_content_type : application/zip
0 commit comments