diff --git a/.github/workflows/dusk.yml b/.github/workflows/dusk.yml new file mode 100644 index 0000000000000..2041770165442 --- /dev/null +++ b/.github/workflows/dusk.yml @@ -0,0 +1,49 @@ +# Instructions for GitHub to build Dusk's smart contract compilers. + +on: + pull_request: + push: + branches: + - master + +name: Dusk Contract Compilers + +jobs: + target: + name: Build Linux Compilers + strategy: + matrix: + os: [ ubuntu-latest, macos-latest ] + target: [ + x86_64-unknown-linux-gnu, + x86_64-apple-darwin, + aarch64-apple-darwin, + ] + exclude: + - os: ubuntu-latest + target: x86_64-apple-darwin + - os: ubuntu-latest + target: aarch64-apple-darwin + - os: macos-latest + target: x86_64-unknown-linux-gnu + runs-on: ${{ matrix.os }} + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Install dependencies + if: matrix.os == 'ubuntu-latest' + run: sudo apt update && sudo apt install -y ninja-build + + - name: Install dependencies + if: matrix.os == 'macos-latest' + run: brew install ninja openssl@3 + + - name: Run build + run: ./x build --host ${{ matrix.target }} + + - name: Upload build + uses: actions/upload-artifact@v3 + with: + name: duskc-${{ matrix.target }}-${{ github.ref }} + path: build/