|
61 | 61 | fi |
62 | 62 |
|
63 | 63 | echo "Running examples/$name.b $input" |
64 | | - .github/test.sh "$name" "$expected" "$input" |
| 64 | + .github/scripts/test.sh "$name" "$expected" "$input" |
65 | 65 | done |
| 66 | +
|
| 67 | + build-native: |
| 68 | + strategy: |
| 69 | + matrix: |
| 70 | + os: [ macos-latest, ubuntu-latest ] |
| 71 | + include: |
| 72 | + - name: MacOS |
| 73 | + os: macos-latest |
| 74 | + artifact: bf-x86_64-apple-darwin |
| 75 | + - name: Ubuntu |
| 76 | + os: ubuntu-latest |
| 77 | + artifact: bf-x86_64-linux |
| 78 | + |
| 79 | + name: Graal Build |
| 80 | + runs-on: ${{ matrix.os }} |
| 81 | + needs: [ test, example ] |
| 82 | + |
| 83 | + steps: |
| 84 | + - uses: actions/checkout@v4 |
| 85 | + - uses: coursier/cache-action@v6 |
| 86 | + - uses: VirtusLab/scala-cli-setup@main |
| 87 | + with: |
| 88 | + power: true |
| 89 | + |
| 90 | + - name: Build |
| 91 | + run: | |
| 92 | + scala-cli --power package . -o ./out/bf --native-image \ |
| 93 | + --graalvm-java-version 21 \ |
| 94 | + --graalvm-version 21 \ |
| 95 | + --graalvm-args "--verbose" \ |
| 96 | + --graalvm-args "--no-fallback" \ |
| 97 | + --graalvm-args "--native-image-info" \ |
| 98 | + --graalvm-args "-H:+ReportExceptionStackTraces" \ |
| 99 | + --graalvm-args "-H:-UseServiceLoaderFeature" |
| 100 | +
|
| 101 | + - name: Upload artifacts |
| 102 | + uses: actions/upload-artifact@v4 |
| 103 | + with: |
| 104 | + name: ${{ matrix.artifact }} |
| 105 | + path: ./out/bf |
| 106 | + if-no-files-found: error |
| 107 | + retention-days: 1 |
| 108 | + |
| 109 | + release: |
| 110 | + name: Release |
| 111 | + runs-on: ubuntu-latest |
| 112 | + needs: [ test, example, build-native ] |
| 113 | + if: "startsWith(github.ref, 'refs/tags/')" |
| 114 | + |
| 115 | + steps: |
| 116 | + - uses: actions/checkout@v4 |
| 117 | + |
| 118 | + - name: Download artifacts |
| 119 | + uses: actions/download-artifact@v4 |
| 120 | + |
| 121 | + - name: Prepare release |
| 122 | + run: .github/scripts/pre-release.sh releases |
| 123 | + |
| 124 | + - name: Release |
| 125 | + uses: softprops/action-gh-release@v2 |
| 126 | + with: |
| 127 | + generate_release_notes: true |
| 128 | + fail_on_unmatched_files: true |
| 129 | + files: releases/* |
| 130 | + token: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments