Updated configure. #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
name: Create release | |
jobs: | |
build_linux: | |
name: Build linux ${{matrix.architecture}} static | |
container: | |
image: ubuntu:20.04 | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [ x64, arm64 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tools | |
run: ./.github/build/linux-${{matrix.architecture}}/install.sh | |
- name: Clone dependencies | |
run: ./clone-dependencies.sh | |
- name: Build | |
run: ./.github/build/linux-${{matrix.architecture}}/build.sh | |
- name: Prepare artifacts | |
run: | | |
mkdir -p Artifacts | |
cp -r /tmp/dependencies/lib Artifacts | |
cp -r /tmp/dependencies/include Artifacts | |
cd Artifacts | |
zip -r ../linux-${{matrix.architecture}}-static.zip . | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-${{matrix.architecture}}-static | |
path: linux-${{matrix.architecture}}-static.zip | |
build_linux_musl: | |
name: Build Linux musl ${{matrix.architecture}} static | |
container: | |
image: alpine:3.18 | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [ x64 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tools | |
run: ./.github/build/linux-musl-${{matrix.architecture}}/install.sh | |
- name: Clone dependencies | |
run: ./clone-dependencies.sh | |
- name: Build | |
run: ./.github/build/linux-musl-${{matrix.architecture}}/build.sh | |
- name: Prepare artifacts | |
run: | | |
mkdir -p Artifacts | |
cp -r /tmp/dependencies/lib Artifacts | |
cp -r /tmp/dependencies/lib64 Artifacts | |
cp -r /tmp/dependencies/include Artifacts | |
cd Artifacts | |
zip -r ../linux-musl-${{matrix.architecture}}-static.zip . | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-musl-${{matrix.architecture}}-static | |
path: linux-musl-${{matrix.architecture}}-static.zip | |
build_macos: | |
name: Build macOS ${{matrix.architecture}} static | |
runs-on: macos-13 | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [ x64, arm64 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tools | |
run: ./.github/build/macos-${{matrix.architecture}}/install.sh | |
- name: Clone dependencies | |
run: ./clone-dependencies.sh | |
- name: Build | |
run: ./.github/build/macos-${{matrix.architecture}}/build.sh | |
- name: Prepare artifacts | |
run: | | |
mkdir -p Artifacts | |
cp -r /tmp/dependencies/lib Artifacts | |
cp -r /tmp/dependencies/include Artifacts | |
cd Artifacts | |
zip -r ../macos-${{matrix.architecture}}-static.zip . | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-${{matrix.architecture}}-static | |
path: macos-${{matrix.architecture}}-static.zip | |
build_wasm: | |
name: Build wasm ${{matrix.architecture}} static | |
container: | |
image: emscripten/emsdk:4.0.7 | |
runs-on: ubuntu-24.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [ x86 ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install tools | |
run: ./.github/build/wasm-${{matrix.architecture}}/install.sh | |
- name: Clone dependencies | |
run: ./clone-dependencies.sh | |
- name: Build | |
run: ./.github/build/wasm-${{matrix.architecture}}/build.sh | |
- name: Prepare artifacts | |
run: | | |
mkdir -p Artifacts | |
cp -r /tmp/dependencies/lib Artifacts | |
cp -r /tmp/dependencies/include Artifacts | |
cd Artifacts | |
zip -r ../wasm-${{matrix.architecture}}-static.zip . | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: wasm-${{matrix.architecture}}-static | |
path: wasm-${{matrix.architecture}}-static.zip | |
build_windows: | |
name: Build windows ${{matrix.architecture}} ${{matrix.buildType}} ${{matrix.openmp}} ${{matrix.all == true && 'all' || ''}} ${{matrix.linkRuntime == true && 'linked runtime' || ''}} | |
runs-on: windows-2022 | |
strategy: | |
fail-fast: false | |
matrix: | |
architecture: [ x64, arm64, x86 ] | |
buildType: [ dynamic, static ] | |
openmp: [ OpenMP, noOpenMP ] | |
all: [ false, true ] | |
linkRuntime: [ false, true ] | |
exclude: | |
- buildType: dynamic | |
linkRuntime: true | |
- all: true | |
linkRuntime: true | |
env: | |
ARTIFACT_NAME: windows-${{matrix.architecture}}-${{matrix.buildType}}-${{matrix.openmp}}${{matrix.all == true && '-all' || ''}}${{matrix.linkRuntime == true && '-linked-runtime' || ''}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download configure | |
shell: cmd | |
run: | | |
.github\build\windows\download-configure.cmd | |
- name: Clone dependencies | |
shell: cmd | |
run: clone-dependencies.cmd | |
- name: Run configure | |
shell: cmd | |
working-directory: Configure | |
run: | | |
Configure.Release.x64.exe /noWizard /VS2022 /${{matrix.architecture}} /${{matrix.buildType}} /${{matrix.openmp}} ${{matrix.all == true && '/includeOptional /incompatibleLicense' || ''}} ${{matrix.linkRuntime == true && '/linkRuntime' || ''}} | |
- name: Build | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\Common7\Tools\VsDevCmd.bat" | |
msbuild IM7.${{matrix.buildType}}.${{matrix.architecture}}.sln /m /t:Rebuild /p:Configuration=Release,Platform=${{matrix.architecture}} | |
- name: Prepare artifacts | |
shell: cmd | |
run: | | |
del "Artifacts\bin\*.pdb" /Q 2>nul | |
del "Artifacts\lib\*.pdb" /Q 2>nul | |
for %%F in ("Artifacts\lib\*.lib") do ( | |
echo %%~nxF >> "Artifacts\pre-build-libs.txt" | |
) | |
powershell -Command "Compress-Archive -Path 'Artifacts\*' -DestinationPath '${{ env.ARTIFACT_NAME }}.zip'" | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ env.ARTIFACT_NAME }} | |
path: ${{ env.ARTIFACT_NAME }}.zip | |
release: | |
name: Create release | |
if: github.event_name == 'workflow_dispatch' | |
runs-on: windows-2022 | |
needs: | |
- build_linux | |
- build_linux_musl | |
- build_macos | |
- build_wasm | |
- build_windows | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
name: Download artifacts | |
with: | |
path: ${{ github.workspace }}/Artifacts | |
merge-multiple: true | |
- name: Set release number | |
shell: bash | |
run: echo "release=$(date +'%Y.%m.%d.%H%M')" >> $GITHUB_ENV | |
- name: Create and push tag | |
shell: bash | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git tag $release | |
git push origin $release | |
- name: Publish release | |
uses: softprops/action-gh-release@v2 | |
with: | |
name: ${{ env.release }} | |
tag_name: ${{ env.release }} | |
files: | | |
${{ github.workspace }}/Artifacts/*.zip |