diff --git a/.github/workflows/mako.yml b/.github/workflows/mako.yml new file mode 100644 index 0000000..4007d6e --- /dev/null +++ b/.github/workflows/mako.yml @@ -0,0 +1,70 @@ +# This is a basic workflow to help you get started with Actions + +name: Build mako + +# Controls when the workflow will run +on: + # Triggers the workflow on push or pull request events but only for the main branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + # “At 05:00 on Sunday.” + # https://crontab.guru/#0_5_*_*_0 + schedule: + - cron: "0 5 * * 0" + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # Building FDB + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + container: foundationdb/build:centos7-latest + + strategy: + matrix: + branch: ["main", "release-7.1"] + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + - name: git clone + run: git clone https://github.com/apple/foundationdb.git + working-directory: /root + + - name: git checkout + run: git checkout $FDB_BRANCH + working-directory: /root/foundationdb + env: + FDB_BRANCH: ${{ matrix.branch }} + + - name: mkdir build_output + run: mkdir build_output + working-directory: /root + + - name: cmake + run: source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python38/enable && cmake -G Ninja ../foundationdb + working-directory: /root/build_output + + - name: ninja + run: source /opt/rh/devtoolset-8/enable && source /opt/rh/rh-python38/enable && ninja -j2 mako + working-directory: /root/build_output + + - name: list size + run: du -skh * + working-directory: /root/build_output + + - name: search mako + run: "find . | grep mako" + working-directory: /root/build_output + + - name: upload mako + uses: actions/upload-artifact@v2 + with: + name: mako_${{ matrix.branch }} + path: /root/build_output/bin/mako + if-no-files-found: error + retention-days: 10