Login
7 branches 0 tags
Ben (Win10) Fixed [efmtln] and [fmt] when pre-expanding 01375f2 3 years ago 595 Commits
nujel / .github / workflows / ci.yml
name: CI

on:
  push:

jobs:
  build-windows:
    name: ${{matrix.os}}-${{ matrix.sys }}
    runs-on: ${{ matrix.os }}
    defaults:
      run:
        shell: msys2 {0}
    strategy:
      fail-fast: false
      matrix:
        os: [windows-2019, windows-2022]
        sys: [mingw64, mingw32, ucrt64, clang64]
    steps:
    - name: Setup MSYS2
      uses: msys2/setup-msys2@v2
      with:
        msystem: ${{ matrix.sys }}
        install: base-devel
        pacboy: toolchain:p
    - name: Checkout
      uses: actions/checkout@v2
    - name: Compile bootstrap runtime
      run: make -j2 nujel-bootstrap
    - name: Test bootstrap runtime
      run: make test.bootstrap
    - name: Compile runtime
      run: make -j2 nujel.exe
    - name: Test runtime
      run: make test.slow
  release-windows:
    name: release-windows-${{ matrix.sys }}
    needs: build-windows
    runs-on: windows-latest
    defaults:
      run:
        shell: msys2 {0}
    strategy:
      fail-fast: false
      matrix:
        sys: [mingw32, mingw64, ucrt64, clang64]
    steps:
    - name: Setup MSYS2
      uses: msys2/setup-msys2@v2
      with:
        msystem: ${{ matrix.sys }}
        install: base-devel
        pacboy: toolchain:p
    - name: Checkout
      uses: actions/checkout@v2
    - name: Compile bootstrap runtime
      run: make -j2 nujel-bootstrap
    - name: Test bootstrap runtime
      run: make test.bootstrap
    - name: Compile release
      run: make -j2 release
    - name: Run Tests
      run: make test.slow
    - name: Upload release
      uses: actions/upload-artifact@v2
      with:
        name: Nujel-windows-${{ matrix.sys }}-${{ github.ref_name }}
        path: "./nujel.exe"
        retention-days: 7
  build-macos:
    name: build-${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [macos-11, macos-10.15]
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Compile bootstrap runtime
      run: make -j2 nujel-bootstrap
    - name: Test bootstrap runtime
      run: make test.bootstrap
    - name: Compile runtime
      run: make -j2 nujel
    - name: Test runtime
      run: make test.slow
  release-macos:
    needs: build-macos
    runs-on: macos-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Compile bootstrap runtime
      run: make -j2 nujel-bootstrap
    - name: Test bootstrap runtime
      run: make test.bootstrap
    - name: Build Release
      run: make -j2 release
    - name: Test runtime
      run: make test.slow
    - name: Upload release
      uses: actions/upload-artifact@v2
      with:
        name: Nujel-macos-${{ github.ref_name }}
        path: "./nujel"
        retention-days: 7
  build-linux:
    name: ${{ matrix.os }}-${{ matrix.cc }}-${{matrix.make}}
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os: [ubuntu-20.04, ubuntu-18.04]
        cc: [clang, gcc]
        make: [bmake, make]
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Install compiler
      run: |
        sudo apt-get -y install ${{ matrix.cc }} ${{ matrix.make }}
    - name: Compile bootstrap runtime
      run: ${{matrix.make}} CC=${{ matrix.cc }} -j2 nujel-bootstrap
    - name: Test bootstrap runtime
      run: ${{matrix.make}} CC=${{ matrix.cc }} test.bootstrap
    - name: Compile runtime
      run: ${{matrix.make}} CC=${{ matrix.cc }} -j2 nujel
    - name: Test runtime
      run: ${{matrix.make}} test.slow
  release-linux:
    runs-on: ubuntu-latest
    needs: build-linux
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Install Dependencies
      run: sudo apt-get install -y musl-dev musl-tools
    - name: Build bootstrap runtime
      run: make -j2 nujel-bootstrap
    - name: Test bootstrap runtime
      run: make test.bootstrap
    - name: Build release
      run: make release.musl
    - name: Test runtime
      run: make test.slow
    - name: Upload release
      uses: actions/upload-artifact@v2
      with:
        name: Nujel-linux-${{ github.ref_name }}
        path: "./nujel"
        retention-days: 7
  release-wasm:
    runs-on: ubuntu-latest
    steps:
    - name: Checkout
      uses: actions/checkout@v2
    - name: Compile
      run: make -j2
    - name: Compile WASM REPL
      run: bash tools/buildwasm
    - name: Upload release
      uses: actions/upload-artifact@v2
      with:
        name: Nujel-Web-${{ github.ref_name }}
        path: "./web/"
        retention-days: 7
  deploy-wasm:
    runs-on: ubuntu-latest
    needs: release-wasm
    if: ${{ github.ref_name == 'master' }}
    steps:
    - name: Download artifact
      uses: actions/download-artifact@v2
      with:
        name: Nujel-Web-${{ github.ref_name }}
        path: "./web/"
    - name: Deploy to Staging server
      uses: easingthemes/ssh-deploy@main
      env:
        SOURCE: "web/"
        SSH_PRIVATE_KEY: ${{ secrets.SSH_KEY }}
        REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
        REMOTE_USER: ${{ secrets.REMOTE_USER }}
        REMOTE_PORT: 42
        TARGET: ${{ secrets.REMOTE_TARGET }}/nujel/