diff --git a/.github/workflows/Makefile b/.github/workflows/Makefile index a345bbf..de69c09 100644 --- a/.github/workflows/Makefile +++ b/.github/workflows/Makefile @@ -13,6 +13,9 @@ all: $(OBJS) clean: rm -f $(OBJS) +format: + jsonnetfmt -i *.jsonnet + # for pad's codemap .PHONY: gen-codemapignore gen-codemapignore: $(OBJS) diff --git a/.github/workflows/build-and-test.jsonnet b/.github/workflows/build-and-test.jsonnet index f32ccf1..d579d9b 100644 --- a/.github/workflows/build-and-test.jsonnet +++ b/.github/workflows/build-and-test.jsonnet @@ -1,3 +1,5 @@ +// Build and test using setup-ocaml@v2 mostly. + // ---------------------------------------------------------------------------- // Helpers // ---------------------------------------------------------------------------- @@ -6,75 +8,47 @@ local checkout = { uses: 'actions/checkout@v3', }; -local build_script = ||| - ./configure - . ./env - mk - mk install -|||; - // ---------------------------------------------------------------------------- -// The jobs +// The job // ---------------------------------------------------------------------------- -// Arch -local build_x86_linux_arch_job = { +local job = { + // LATER: + // strategy: + // fail-fast: false + // matrix: + // os: + // - macos-latest + // - ubuntu-latest + // - windows-latest + // ocaml-compiler: + // - "5.1" + // + // runs-on: ${{ matrix.os }} 'runs-on': 'ubuntu-latest', - container: 'archlinux', steps: [ checkout, + { + uses: "ocaml/setup-ocaml@v2", + with: { + // TODO: ${{ matrix.ocaml-compiler }} + 'ocaml-compiler': "4.02.1", + } + }, { name: 'Install dependencies', run: ||| - pacman -Sy --noconfirm gcc lib32-glibc lib32-gcc-libs + echo No dependencies! This is xix! It does not need anything! |||, }, { - name: 'Build', - run: build_script, - } - ] -}; - -// Alpine -//local build_x86_linux_alpine_job = { -// 'runs-on': 'ubuntu-latest', -// // alpine does not support gcc-multilib like ubuntu/arch -// // so simpler to start from a 32 bits alpine image -// // But this does not seem to work well with GHA :( -// container: 'i386/alpine', -// steps: [ -// checkout, -// { -// name: 'Install dependencies', -// run: ||| -// apk add bash gcc -// |||, -// }, -// { -// name: 'Build', -// run: build_script, -// } -// ] -//}; - -// Ubuntu -local build_x86_linux_ubuntu_job = { - 'runs-on': 'ubuntu-latest', - steps: [ - checkout, - { - name: 'Install dependencies', + name: 'Build mk/rc', run: ||| - sudo apt update - sudo apt-get install -y gcc-multilib + eval $(opam env) + ./bootstrap-mk.sh |||, }, - { - name: 'Build', - run: build_script, - } - ] + ], }; // ---------------------------------------------------------------------------- @@ -93,10 +67,14 @@ local build_x86_linux_ubuntu_job = { 'master', ], }, + schedule: [ + { + // every day at 12:59 + cron: '59 12 * * *', + }, + ], }, jobs: { - 'build-x86-linux-arch': build_x86_linux_arch_job, - //'build-x86-linux-alpine': build_x86_linux_alpine_job, - 'build-x86-linux-ubuntu': build_x86_linux_ubuntu_job, + job: job, }, } diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml index b7e4153..475d6df 100644 --- a/.github/workflows/build-and-test.yml +++ b/.github/workflows/build-and-test.yml @@ -1,37 +1,25 @@ # AUTOGENERATED FROM build-and-test.jsonnet DO NOT MODIFY jobs: - build-x86-linux-arch: - container: archlinux + job: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 + - uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: 4.02.1 - name: Install dependencies run: | - pacman -Sy --noconfirm gcc lib32-glibc lib32-gcc-libs - - name: Build + echo No dependencies! This is xix! It does not need anything! + - name: Build mk/rc run: | - ./configure - . ./env - mk - mk install - build-x86-linux-ubuntu: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - name: Install dependencies - run: | - sudo apt update - sudo apt-get install -y gcc-multilib - - name: Build - run: | - ./configure - . ./env - mk - mk install + eval $(opam env) + ./bootstrap-mk.sh name: build-and-test on: pull_request: null push: branches: - master + schedule: + - cron: 59 12 * * * workflow_dispatch: null diff --git a/Makefile b/Makefile index 59457bd..16015f2 100644 --- a/Makefile +++ b/Makefile @@ -29,6 +29,16 @@ clean: # Developer targets ############################################################################### +pr: + git push origin `git rev-parse --abbrev-ref HEAD` + hub pull-request -b master + +push: + git push origin `git rev-parse --abbrev-ref HEAD` + +merge: + A=`git rev-parse --abbrev-ref HEAD` && git checkout master && git pull && git branch -D $$A + # See https://github.com/aryx/codemap visual: codemap -screen_size 3 -filter semgrep -efuns_client efuns_client -emacs_client /dev/null .