Solver refactoring #2486
Workflow file for this run
This file contains 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
name: CI Windows | |
on: | |
pull_request: | |
paths-ignore: | |
- 'doc/**' | |
- '**.md' | |
- '**.rst' | |
- '**.txt' | |
release: | |
types: [published] | |
workflow_dispatch: | |
env: | |
ALIRE_OS: windows | |
MSYS64_ROOT: C:\Users\runneradmin\AppData\Local\alire\cache\msys64 | |
MINGW64_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\mingw64\bin | |
MSYS2_PATH: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin | |
PACMAN: C:\Users\runneradmin\AppData\Local\alire\cache\msys64\usr\bin\pacman --noconfirm | |
jobs: | |
build: | |
name: CI on Windows | |
runs-on: windows-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
submodules: true | |
- name: Install FSF toolchain | |
uses: alire-project/alr-install@v2 | |
with: | |
crates: gnat_native gprbuild | |
prefix: alire_prefix | |
- name: Check toolchain architecture | |
uses: mosteo-actions/gnat-toolchain-arch-checker@v1 | |
- name: Build alr | |
run: gprbuild -j0 -p -P alr_env | |
- name: Remove previous alr's msys2 (so a new one can be tested) | |
shell: pwsh | |
run: | | |
if (Test-Path "${{env.MSYS64_ROOT}}") { | |
Remove-Item "${{env.MSYS64_ROOT}}" -Recurse -Force } | |
- name: Display built alr and trigger install of msys2 | |
run: ./bin/alr version | |
- name: install tar from msys2 (Git tar in Actions VM does not seem to work) | |
run: ${{env.PACMAN}} -S tar | |
- name: Install Python 3.x (required for the testsuite) | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Run test script | |
run: scripts/ci-github.sh | |
shell: bash | |
env: | |
BRANCH: ${{ github.base_ref }} | |
INDEX: "" | |
- name: Install alr | |
run: gprinstall -p -P alr_env --prefix=${{ runner.temp }}/alr_install | |
# Ascertain whether alr can run without the toolchain that built it | |
- name: Check standalone alr | |
uses: mosteo-actions/alr-standalone-checker@v1 | |
with: | |
alr_path: bin | |
toolchain_path: alire_prefix | |
- name: Install qt-installer-framework in msys2 | |
run: ${{env.PACMAN}} -S mingw64/mingw-w64-x86_64-qt-installer-framework | |
- name: Add msys2 /mingw64/bin to the path (for qt-installer-framework) | |
run: echo '${{env.MINGW64_PATH}}' >> $GITHUB_PATH | |
shell: bash | |
- name: Install zip in msys2 | |
run: ${{env.PACMAN}} --noconfirm -S zip | |
- name: Add msys2 /usr/bin to the path (for zip) | |
run: echo '${{env.MSYS2_PATH}}' >> $GITHUB_PATH | |
shell: bash | |
- name: Run installer build script | |
run: bash make-alire-installer | |
shell: bash | |
working-directory: scripts/installer/ | |
env: | |
ALR_INSTALL_DIR: ${{ runner.temp }}/alr_install | |
ALR_INSTALL_OS: ${{ runner.os }} | |
- name: Upload installer | |
uses: actions/upload-artifact@v4 | |
with: | |
name: installer-release-package | |
path: scripts/installer/alire-*.exe | |
- name: Upload zip archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: zip-release-package | |
path: scripts/installer/alire-*.zip | |
- name: Upload tar archive | |
uses: actions/upload-artifact@v4 | |
with: | |
name: tar-release-package | |
path: scripts/installer/alire-*.tar.xz | |
- name: Upload logs (if failed) | |
if: failure() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: testsuite-log-windows.zip | |
path: testsuite/out | |
# Release steps start here. These only run during a release creation. | |
- name: Retrieve upload URL for the release | |
if: github.event_name == 'release' | |
id: get_release | |
uses: bruceadams/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ github.token }} | |
- name: Rename installer | |
if: github.event_name == 'release' | |
run: copy scripts/installer/alire-*.exe scripts/installer/alire-install.exe | |
- name: Get release version | |
if: github.event_name == 'release' | |
id: get_version | |
uses: battila7/get-version-action@v2 | |
- name: Upload installer asset | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: scripts/installer/alire-install.exe | |
asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-installer-x86_64-windows.exe | |
asset_content_type: application/vnd.microsoft.portable-executable | |
- name: Package binaries | |
if: github.event_name == 'release' | |
run: zip alr-bin-windows.zip bin/alr.exe LICENSE.txt | |
- name: Upload binary asset | |
if: github.event_name == 'release' | |
uses: actions/upload-release-asset@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
upload_url: ${{ steps.get_release.outputs.upload_url }} | |
asset_path: alr-bin-windows.zip | |
asset_name: alr-${{ steps.get_version.outputs.version-without-v }}-bin-x86_64-windows.zip | |
asset_content_type: application/zip |