@@ -33,80 +33,54 @@ jobs:
3333 include :
3434 - build-type : main
3535 platform : amd64
36- runner : " ['self-hosted','Linux','X64']"
37- lib-dir : x86_64
38- container : ubuntu:22.04
36+ runner : " ['ubuntu-24.04']"
3937 - build-type : nightly
4038 platform : amd64
4139 runner : " ['ubuntu-24.04']"
42- lib-dir : x86_64
4340 - build-type : main-arm64
4441 platform : arm64
4542 runner : " ['ubuntu-24.04-arm']"
46- lib-dir : aarch64
4743 runs-on : ${{ fromJson(matrix.runner) }}
4844 steps :
49- - name : Clean up previous run artifacts
50- run : sudo rm -rf ${{ github.workspace }}/scenario_out
51- # https://github.com/actions/checkout/issues/211
52- - name : Change permission of workspace
45+ - name : 🔧 Change permission of workspace
5346 run : |
47+ sudo rm -rf ${{ github.workspace }}/scenario_out
5448 sudo chown -R $USER:$USER ${{ github.workspace }}
5549
56- - name : Check out repository
57- uses : actions/checkout@v4
58-
59- - name : Derive image names
60- id : derive
61- uses : ./.github/actions/derive-image-names
62- with :
63- rosdistro : humble
64-
65- - name : Set git config
66- uses : autowarefoundation/autoware-github-actions/set-git-config@v1
67- with :
68- token : ${{ secrets.GITHUB_TOKEN }}
50+ - name : 📥 Check out repository
51+ uses : actions/checkout@v6
6952
70- - name : Get changed files
53+ - name : 📂 Get changed files
7154 id : changed-files
72- uses : step-security/changed-files@v46
55+ uses : step-security/changed-files@v47
7356 with :
7457 files : |
7558 repositories/*.repos
76- .github/actions/docker-build/action.yaml
7759 .github/workflows/health-check.yaml
7860 ansible-galaxy-requirements.yaml
7961 ansible/**
80- docker/**
81- setup-dev-env.sh
82-
83- - name : Show disk space
84- if : always()
85- run : |
86- df -h
87-
88- - name : Free disk space
89- if : ${{ steps.changed-files.outputs.any_changed == 'true' &&
90- matrix.build-type != 'main' }}
91- uses : ./.github/actions/free-disk-space
62+ docker-new/**
9263
93- - name : Show runner info
64+ - name : 💻 Runner specs
9465 run : |
9566 echo "::group::CPU"
96- nproc
97- lscpu
67+ lscpu | grep -E "^(Architecture|CPU\(s\)|Model name|Thread|Core|Socket)"
9868 echo "::endgroup::"
9969 echo "::group::Memory"
10070 free -h
10171 echo "::endgroup::"
102- echo "::group::Swap"
103- swapon --show
104- echo "::endgroup::"
10572 echo "::group::Disk"
106- df -h
73+ df -h /
10774 echo "::endgroup::"
10875
109- - name : Create additional swap
76+ - name : 🧹 Free disk space
77+ if : ${{ matrix.build-type != 'main' &&
78+ (steps.changed-files.outputs.any_changed == 'true' ||
79+ github.event_name == 'schedule' ||
80+ github.event_name == 'workflow_dispatch') }}
81+ uses : ./.github/actions/free-disk-space
82+
83+ - name : 💾 Create additional swap
11084 if : ${{ matrix.platform == 'arm64' &&
11185 (steps.changed-files.outputs.any_changed == 'true' ||
11286 github.event_name == 'schedule' ||
@@ -117,30 +91,84 @@ jobs:
11791 sudo mkswap /mnt/swapfile
11892 sudo swapon /mnt/swapfile
11993 free -h
120- swapon --show
12194
122- - name : Build 'Autoware'
95+ - name : 📦 Import source repos
96+ if : ${{ steps.changed-files.outputs.any_changed == 'true' ||
97+ github.event_name == 'schedule' ||
98+ github.event_name == 'workflow_dispatch' }}
99+ run : |
100+ pipx install vcs2l
101+ mkdir -p src
102+ vcs import --shallow src < repositories/autoware.repos
103+
104+ - name : 📦 Overlay nightly repos
105+ if : ${{ matrix.build-type == 'nightly' &&
106+ (steps.changed-files.outputs.any_changed == 'true' ||
107+ github.event_name == 'schedule' ||
108+ github.event_name == 'workflow_dispatch') }}
109+ run : |
110+ vcs import --shallow --force src < repositories/autoware-nightly.repos
111+
112+ - name : 🐳 Setup Docker Buildx
113+ if : ${{ steps.changed-files.outputs.any_changed == 'true' ||
114+ github.event_name == 'schedule' ||
115+ github.event_name == 'workflow_dispatch' }}
116+ uses : docker/setup-buildx-action@v4
117+ with :
118+ buildkitd-config-inline : |
119+ [worker.oci]
120+ max-parallelism = 2
121+
122+ - name : 🔑 Login to GitHub Container Registry
123+ if : ${{ steps.changed-files.outputs.any_changed == 'true' ||
124+ github.event_name == 'schedule' ||
125+ github.event_name == 'workflow_dispatch' }}
126+ uses : docker/login-action@v4
127+ with :
128+ registry : ghcr.io
129+ username : ${{ github.repository_owner }}
130+ password : ${{ github.token }}
131+
132+ - name : 🔨 Build Autoware (docker-new)
123133 if : ${{ steps.changed-files.outputs.any_changed == 'true' ||
124134 github.event_name == 'schedule' ||
125135 github.event_name == 'workflow_dispatch' }}
126- uses : ./.github/actions/docker-build
136+ uses : docker/bake-action@v7
137+ env :
138+ ROS_DISTRO : humble
127139 with :
128- platform : ${{ matrix.platform }}
129- cache-tag-suffix : ${{ matrix.build-type }}
130- image-artifact-name : ${{ matrix.build-type == 'main' && 'autoware-image' || '' }}
131- additional-repos : ${{ matrix.build-type == 'nightly' && 'repositories/autoware-nightly.repos' || '' }}
132- build-args : |
133- ROS_DISTRO=${{ steps.derive.outputs.rosdistro }}
134- AUTOWARE_BASE_IMAGE=${{ steps.derive.outputs.autoware_base_image }}
135- AUTOWARE_BASE_CUDA_IMAGE=${{ steps.derive.outputs.autoware_base_cuda_image }}
136- LIB_DIR=${{ matrix.lib-dir }}
137-
138- - name : Show disk space
140+ source : .
141+ targets : universe-devel
142+ files : docker-new/docker-bake.hcl
143+ load : true
144+ provenance : false
145+ set : |
146+ *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache-new:humble-${{ matrix.platform }}-main
147+ *.cache-from=type=registry,ref=ghcr.io/${{ github.repository }}-buildcache-new:${{ matrix.build-type }}-humble-${{ matrix.platform }}-main
148+
149+ - name : 💾 Save Docker image
150+ if : ${{ matrix.build-type == 'main' &&
151+ (steps.changed-files.outputs.any_changed == 'true' ||
152+ github.event_name == 'schedule' ||
153+ github.event_name == 'workflow_dispatch') }}
154+ run : docker save autoware:universe-devel-humble | gzip > /tmp/autoware-image.tar.gz
155+
156+ - name : 📤 Upload Docker image artifact
157+ if : ${{ matrix.build-type == 'main' &&
158+ (steps.changed-files.outputs.any_changed == 'true' ||
159+ github.event_name == 'schedule' ||
160+ github.event_name == 'workflow_dispatch') }}
161+ uses : actions/upload-artifact@v7
162+ with :
163+ name : autoware-image
164+ path : /tmp/autoware-image.tar.gz
165+
166+ - name : 📊 Disk space
139167 if : always()
140- run : |
141- df -h
168+ run : df -h
169+
142170 scenario-test :
143171 needs : docker-build
144172 uses : ./.github/workflows/scenario-test-reusable.yaml
145173 with :
146- autoware_container_image : autoware:health-check-${{ github.sha }}
174+ autoware_container_image : autoware:universe-devel-humble
0 commit comments