|
| 1 | +name: Build package to Julia |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + |
| 6 | +jobs: |
| 7 | + download_releases: |
| 8 | + runs-on: ubuntu-latest |
| 9 | + steps: |
| 10 | + - name: download release asset from deterministicGaussianSampling |
| 11 | + uses: robinraju/release-downloader@v1 |
| 12 | + with: |
| 13 | + repository: "KIT-ISAS/deterministicGaussianSampling" |
| 14 | + latest: true |
| 15 | + fileName: "*.zip" |
| 16 | + out-file-path: "deterministicGaussianSamplingLibs" |
| 17 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 18 | + |
| 19 | + - name: upload downloaded libs as artifact |
| 20 | + uses: actions/upload-artifact@v4 |
| 21 | + with: |
| 22 | + name: deterministicGaussianSampling-libs |
| 23 | + path: deterministicGaussianSamplingLibs |
| 24 | + |
| 25 | + test: |
| 26 | + needs: download_releases |
| 27 | + strategy: |
| 28 | + matrix: |
| 29 | + os: [ |
| 30 | + windows-2025, |
| 31 | + windows-2022, |
| 32 | + windows-2019, |
| 33 | + ubuntu-24.04, |
| 34 | + ubuntu-22.04, |
| 35 | + ] #, macos-14, macos-14-large, macos-15, macos-26] |
| 36 | + julia-version: ["1.9", "1.10", "1.11"] |
| 37 | + runs-on: ${{ matrix.os }} |
| 38 | + |
| 39 | + steps: |
| 40 | + - name: checkout repo |
| 41 | + uses: actions/checkout@v4 |
| 42 | + |
| 43 | + - name: Set up Julia ${{ matrix.julia-version }} |
| 44 | + uses: julia-actions/setup-julia@v2 |
| 45 | + with: |
| 46 | + version: ${{ matrix.julia-version }} |
| 47 | + |
| 48 | + - name: get deterministicGaussianSampling libs |
| 49 | + uses: actions/download-artifact@v4 |
| 50 | + with: |
| 51 | + name: deterministicGaussianSampling-libs |
| 52 | + path: external_libs |
| 53 | + |
| 54 | + - name: extract ZIP on Unix |
| 55 | + if: ${{ runner.os == 'Linux' }} |
| 56 | + run: | |
| 57 | + mkdir -p external_libs_unpacked/linux |
| 58 | + unzip external_libs/linux.zip -d external_libs_unpacked/linux |
| 59 | + mkdir -p lib/linux/bin |
| 60 | + cp -r external_libs_unpacked/linux/lib/* lib/linux/bin |
| 61 | +
|
| 62 | + - name: extract ZIP on Windows |
| 63 | + if: ${{ runner.os == 'Windows' }} |
| 64 | + shell: pwsh |
| 65 | + run: | |
| 66 | + New-Item -ItemType Directory -Path external_libs_unpacked\windows -Force |
| 67 | + Expand-Archive -Path external_libs/windows.zip -DestinationPath external_libs_unpacked\windows -Force |
| 68 | + New-Item -ItemType Directory -Path lib\windows\bin -Force |
| 69 | + Copy-Item external_libs_unpacked\windows\bin\* lib\windows\bin -Recurse -Force |
| 70 | +
|
| 71 | + - name: Instantiate Julia environment |
| 72 | + run: | |
| 73 | + julia --project=. -e 'using Pkg; Pkg.instantiate()' |
| 74 | +
|
| 75 | + - name: Run Julia tests |
| 76 | + run: | |
| 77 | + julia --project=. -e 'using Pkg; Pkg.test()' |
0 commit comments