refactor: modular compiler backend, new llvm backend #28
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: Selene CI/CD | |
on: | |
push: | |
branches: | |
- '**' | |
pull_request: | |
branches: | |
- '**' | |
release: | |
types: [created] | |
permissions: | |
contents: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 21 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '21' | |
distribution: 'temurin' | |
- name: Setup Gradle | |
uses: gradle/gradle-build-action@v2 | |
- name: Build with Gradle | |
run: ./gradlew build | |
- name: Build Jester | |
run: | | |
cd jester | |
cargo build --release | |
- name: Upload JVM module artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jvm-modules | |
path: | | |
*/build/libs/*-jvm.jar | |
!compiler/build/libs/*-jvm.jar | |
- name: Rename and upload compiler artifacts | |
run: | | |
mkdir -p artifacts | |
cp compiler/build/libs/selene.jar artifacts/selene-compiler-jvm.jar | |
cp compiler/build/bin/linuxX64/releaseExecutable/compiler.kexe artifacts/selene-compiler-linuxX64 | |
cp compiler/build/bin/windowsX64/releaseExecutable/compiler.exe artifacts/selene-compiler-windowsX64.exe | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: compiler-artifacts | |
path: artifacts/* | |
- name: Upload Jester artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: jester | |
path: jester/target/release/jester | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.event_name == 'release' && github.event.action == 'created' | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download all artifacts | |
uses: actions/download-artifact@v3 | |
- name: Display structure of downloaded files | |
run: ls -R | |
- name: Upload Release Assets | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
compiler-artifacts/selene-compiler-jvm.jar | |
compiler-artifacts/selene-compiler-linuxX64 | |
compiler-artifacts/selene-compiler-windowsX64.exe | |
jester/jester | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |