diff --git a/.github/workflows/pr-testing.yaml b/.github/workflows/pr-testing.yaml index 67a4fd950..0d8a4985b 100644 --- a/.github/workflows/pr-testing.yaml +++ b/.github/workflows/pr-testing.yaml @@ -75,6 +75,31 @@ jobs: - name: rspec tests run: rake spec + build: + name: build openvox-server + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + matrix: + version: ['11', '17'] + steps: + - name: checkout repo + uses: actions/checkout@v4 + with: + submodules: recursive + - name: setup java + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: ${{ matrix.version }} + - name: setup ruby + uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.2' + bundler-cache: true + - name: build it + run: bundle exec rake vox:build + clojure-linting: name: Clojure Linting runs-on: ubuntu-latest @@ -100,6 +125,7 @@ jobs: - clojure-tests - rspec-tests - clojure-linting + - build runs-on: ubuntu-24.04 name: Test suite steps: diff --git a/tasks/build.rake b/tasks/build.rake index 7d05420c5..17e63c9bf 100644 --- a/tasks/build.rake +++ b/tasks/build.rake @@ -5,11 +5,11 @@ require 'tmpdir' @container = 'openvox-server-builder' @timestamp = Time.now.strftime('%Y%m%d_%H%M%S') # It seems like these are special files/names that, when you want to add a new one, require -# changes in some other component. But no, it seems to only really look at the parts of +# changes in some other component. But no, it seems to only really look at the parts of # the text in the string, as long as it looks like "base--i386.cow" # and "---". # I think it just treats all debs like Debian these days. And all rpms are similar. -# So do whatever you want I guess. We really don't need separate packages for each platform. +# So do whatever you want I guess. We really don't need separate packages for each platform. # To be fixed one of these days. Relevant stuff: # https://github.com/puppetlabs/ezbake/blob/aeb7735a16d2eecd389a6bd9e5c0cfc7c62e61a5/resources/puppetlabs/lein-ezbake/template/global/tasks/build.rake # https://github.com/puppetlabs/ezbake/blob/aeb7735a16d2eecd389a6bd9e5c0cfc7c62e61a5/resources/puppetlabs/lein-ezbake/template/global/ext/fpm.rb @@ -46,9 +46,14 @@ namespace :vox do desc 'Build openvox-server packages with Docker' task :build, [:tag] do |_, args| begin - abort 'You must provide a tag.' if args[:tag].nil? || args[:tag].empty? - run_command("git fetch --tags && git checkout #{args[:tag]}") - + #abort 'You must provide a tag.' if args[:tag].nil? || args[:tag].empty? + if args[:tag].nil? || args[:tag].empty? + puts 'running build with current branch' + else + puts "running build on #{args[:tag]}" + run_command("git fetch --tags && git checkout #{args[:tag]}") + end + # If the Dockerfile has changed since this was last built, # delete all containers and do `docker rmi ezbake-builder` unless image_exists @@ -80,4 +85,4 @@ namespace :vox do teardown end end -end \ No newline at end of file +end